添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I've added Lottie to an empty rn project and get following error:

`Could not resolve all dependencies for configuration ':app:_debugApk'.

A problem occurred configuring project ':lottie-react-native'.
> Could not resolve all dependencies for configuration ':lottie-react-native:_debugPublishCopy'.
> Could not find com.android.support:appcompat-v7:27.1.1.
Searched in the following locations:
file:/Users/akbari/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.1.1/appcompat-v7-27.1.1.pom
file:/Users/akbari/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.1.1/appcompat-v7-27.1.1.jar
file:/Users/akbari/bb/android/sdk-manager/com/android/support/appcompat-v7/27.1.1/appcompat-v7-27.1.1.jar
Required by:
bb:lottie-react-native:unspecified > com.airbnb.android:lottie:2.5.5`

Guys can anyone tell me why you are updating gradle items versions?
React Native by default is using build tools 23.0.1 and so on but you updated your own to 26 and 27!
it's a painful process to update gradle versions...

I'm using the latest version of react native ( 0.55.4 )

sluijs, dreamdev21, jwnewman12, allenzhangp, mostafiz93, LRNZ09, kiaxseventh, jeongsd, 1c7, h2soheili, and 2 more reacted with thumbs up emoji iskyok reacted with laugh emoji iskyok reacted with hooray emoji iskyok reacted with eyes emoji All reactions

I had the same issue. According to this issue Could not find com.android.support:appcompat-v7:26.1.0.

In the android gradle file you need to specify the following

compileSdkVersion 26
buildToolsVersion "26.0.1"

and then find this text compile "com.android.support:appcompat-v7"
and make sure it says compile "com.android.support:appcompat-v7:26.0.1"

In your build.gradle file add maven url 'https://maven.google' should look like this

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            url 'https://maven.google.com'
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"

Rebuild your project, then this problem has been solved 😄

jdnichollsc, nysamnang, tipleavalentin, direwolf424, adamhurst, strider97, ijanzz5621, koswarabilly, j2pb, a-tarasyuk, and 45 more reacted with thumbs up emoji duyv reacted with laugh emoji strider97, ManhLQ, zoecarver, ajcrites, jwnewman12, GitHubTracey, gbferreira, donquixote1984, lyvwhyr, mohsen-hassani, and 2 more reacted with hooray emoji tipleavalentin, direwolf424, strider97, ManhLQ, MingyuJeon, toooldmohammad, abumostafa, jwnewman12, gbferreira, donquixote1984, and 6 more reacted with heart emoji All reactions In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings zo0r/react-native-push-notification#1129