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

Android build failing on RN 0.59 #31

Open
mrarlloyd opened this issue Apr 30, 2019 · 5 comments
Open

Android build failing on RN 0.59 #31

mrarlloyd opened this issue Apr 30, 2019 · 5 comments

Comments

@mrarlloyd
Copy link

Getting a build failure for the latest version ^0.6.1 of react-native-image-sequence, using ReactNative 0.59:


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-image-sequence:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
  error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
  /Users/lloyd/development/learner/node_modules/react-native-image-sequence/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found.
  /Users/lloyd/development/learner/node_modules/react-native-image-sequence/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found.
  /Users/lloyd/development/learner/node_modules/react-native-image-sequence/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
  error: failed linking references.```
@alfreddatakillen
Copy link

I'm having this exact problem too. Did you find out more, @mrarlloyd?

@Zontex
Copy link

Zontex commented Aug 18, 2019

+1 having the exact same issue, did anyone manage to solve it?

@koodiohto
Copy link

koodiohto commented Sep 24, 2019

I was able to solve this by adding to my android/build.gradle under allprojects this:

allprojects{
 subprojects {
        afterEvaluate {
            project ->
                if (project.hasProperty("android")) {
                    android {
                        compileSdkVersion = 28
                        buildToolsVersion = "28.0.3"
                    }
                }
        }
    }
....

@tarbundiyahitesh21
Copy link

@koodiohto thanks, it's working,
but when we need more then 28 compieSdkVersion then ?

@choibles
Copy link

choibles commented Sep 22, 2020

Hey, so in case other people are struggling with this issue, I've found that it only appears if Proguard is enabled on the android build (to reduce the size of the APK).

To fix it, I actually learned in this issue comment (for Flutter, go figure) that updating the compileSdkVersion in the specific, offending library will fix the issue. Appears that at the time of this comment, react-native-image-sequence is configured to use compileSdkVersion 23.

If you go into your node_modules -> react-native-image-sequence -> android -> build.gradle file and update compileSdkVersion to 28, the ./gradlew assembleRelease call should work.

Obviously less than ideal to alter the imported library, so perhaps package maintainers can update the compileSdkVersion when they get a chance. Until then, this appears to work.

Cheers

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

No branches or pull requests

6 participants