Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

Build Failed lottie ^2.5.11 #434

Closed
coffeestains1908 opened this issue Jan 13, 2019 · 16 comments
Closed

Build Failed lottie ^2.5.11 #434

coffeestains1908 opened this issue Jan 13, 2019 · 16 comments

Comments

@coffeestains1908
Copy link

coffeestains1908 commented Jan 13, 2019

> Configure project :lottie-react-native
publishNonDefault is deprecated and has no effect anymore. All variants are now published.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':lottie-react-native'.
    > java.lang.NullPointerException (no error message)

====================================================
package.json
"lottie-react-native": "^2.5.11",
"react": "16.6.3",
"react-native": "0.57.8"

====================================================
steps

  1. npm i -s lottie-react-native
  2. react-native link lottie-react-native
  3. react-native run-android

====================================================
configs:

android/gradle/wrapper/gradle-wrapper.properties
distributionUrl=https://services.gradle.org/distributions/gradle-5.0-all.zip

@Geek-ch
Copy link

Geek-ch commented Jan 14, 2019

same +1

@nelsonchen5
Copy link

+1

@maggialejandro
Copy link

Adding this to app/build.gradle fixed the build

compileOptions {
  sourceCompatibility 1.8
  targetCompatibility 1.8
}

@nelsonchen5
Copy link

@maggialejandro this does not fix the build for me

@MateusAndrade
Copy link

@maggialejandro i tried this, but it keeps trhwoing a Null POinter. :(

@clh97
Copy link

clh97 commented Jan 23, 2019

+1

@evanjmg
Copy link

evanjmg commented Jan 24, 2019

Same here but I'm getting this...

/Users/evangillogley/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/373c20edc9370a1ed4115662efb25fde/res/values-v24/values-v24.xml:3:5-157: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
    
/Users/evangillogley/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/373c20edc9370a1ed4115662efb25fde/res/values-v24/values-v24.xml:4:5-135: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
    
/Users/evangillogley/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/373c20edc9370a1ed4115662efb25fde/res/values-v26/values-v26.xml:13:5-16:13: AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
  

@MateusAndrade
Copy link

@evanjmg i have this problem a time ago, i solved this by using a specific version of the project

@Aung-Myint-Thein
Copy link

Which version you are using successfully? @MateusAndrade

@clh97
Copy link

clh97 commented Feb 7, 2019

currently working here with:
"lottie-react-native": "^2.5.11",
"react": "16.6.1",
"react-native": "0.57.7",

needed a full project rebuild width @maggialejandro build.gradle fix.

@Aung-Myint-Thein

@Aung-Myint-Thein
Copy link

Aung-Myint-Thein commented Feb 7, 2019

Thanks for quick reply but when i build the android, I get

Could not find method compileOptions() for arguments [xxxx] on project ':app' of type org.gradle.api.Project

It is working fine on iOS thou. I am also using:

"lottie-react-native": "^2.5.11",
"react": "^16.6.1",
"react-native": "^0.57.5",

Any suggestion..?

@clh97
Copy link

clh97 commented Feb 7, 2019

Are you using 'android/app/build.gradle' file? Like that:

android {
    ...
    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }
    ...
}

@Aung-Myint-Thein
Copy link

Nice! Thanks. Now it is building properly.

@derek-diaz
Copy link

I was having the same issue and adding the compileOptions and doing a gradle clean fixed the issue for me.

cd android
gradlew clean
cd ..
react-native run-android

@emilioicai
Copy link
Member

closed due to inactivity

@FoolCoder
Copy link

@maggialejandro i changed my build file but still getting my build failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests