question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not find support-media-compat.jar

See original GitHub issue

Bug

I get this error for building

Could not resolve all files for configuration ':react-native-video:debugCompileClasspath'.
> Could not find support-media-compat.jar (com.android.support:support-media-compat:28.0.0).
  Searched in the following locations:
      https://dl.google.com/dl/android/maven2/com/android/support/support-media-compat/28.0.0/support-media-compat-28.0.0.jar```

## Environment info

<!--
  Run `react-native info` in your terminal and copy the results here. Also, include the *precise* version number of this library that you are using in the project
-->

React native info output: 
```bash
   React Native Environment Info:
    System:
      OS: Windows 10
      CPU: (8) x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
      Memory: 1.65 GB / 7.92 GB
    Binaries:
      Yarn: 1.13.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
      npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
      Watchman: 4.9.4 - D:\watchman\watchman.EXE
    IDEs:
      Android Studio: Version  3.3.0.0 AI-182.5107.16.33.5314842

Library version: 28.0.0

Steps To Reproduce

Install react-native-video in new react native project

Describe what you expected to happen:

  1. building successfull

Reproducible sample code

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
aliakbarazizicommented, Jun 3, 2019

@aminbaybon I solve problem by changing in android-expoplayer/build.gradle add @aar at this line

implementation "com.android.support:support-media-compat:${safeExtGet('supportLibVersion', '+')}@aar"

I think it’s a bug in windows, because I get no error in mac.

1reaction
aminbayboncommented, Jun 2, 2019

add

compileSdkVersion safeExtGet('compileSdkVersion', 28)
   buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')
       targetSdkVersion safeExtGet('targetSdkVersion', 28) 

in android parts of 1- node_modules/react-native-video/android/build.gradle also in 2 - node_modules/react-native-video/android-exoplayer/build.gradle …

and add this lines in your mainbuild.gradle of project

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            url 'https://maven.google.com'
        }
        maven {
            url "$rootDir/../node_modules/react-native/android"
        }
    }

then run your project again . i works for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not find support-media-compat.jar (com.android.support ...
This happens because Google discontinued the support lib from API level 28. We'll have to update it to the new androidx libraries. For...
Read more >
Could not find support-media-compat.aar - Stack Overflow
I came across the same issue about locating libraries. However by adjusting the repositories order, this issue has been resolved.
Read more >
Gradle build failed & Resolution failed - Unity Forum
I'm getting two errors one when i try to build my game using gradle, im getting this one since i added Adcolony, Inmobi...
Read more >
Using Resolver to get google play services
ArtifactNotFoundException : Could not find artifact com.google.android.gms:play-services-fitness:jar:15.0.1 in https://maven.google.com/ ...
Read more >
Make (and build, run) failed due to locked file even for new ...
A new project will have some dependencies jarlib like ... I found a 777 file ".fuse_hidden000026ca00000017", but I can't delete it manually with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found