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.

Android build failed with AATP Error in RN 0.57.4

See original GitHub issue

Procedure are:

  1. Create new react-native project with react-native init
  2. Add latest react-native-fcm (16.2.4) and gradle settings according to README
  3. Run debug build (cd android and ./gradlew assembleDebug)

Version of RN and react-native-fcm are:

  • react-native 0.57.4
  • react-native-fcm 16.2.4

and reproduced in my repository. https://github.com/ohnishiakira/RNFcmSample

$ ./gradlew assembleDebug 

> Configure project :app 
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

> Configure project :react-native-fcm 
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

> Task :app:processDebugGoogleServices 
Parsing json file: /Users/akira/Documents/sketch/ReactNative/FcmSample/android/app/google-services.json

/Users/akira/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/c216c91b596b7491492b09306fa38d6f/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.
    
/Users/akira/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/c216c91b596b7491492b09306fa38d6f/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/ttcIndex not found.
    
error: failed linking references.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to process resources, see aapt output above for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
22 actionable tasks: 2 executed, 20 up-to-date

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:9

github_iconTop GitHub Comments

10reactions
paalexcommented, Nov 6, 2018

In my case was resolved by removing react-native-fcm (npm uninstall react-native-fcm) and downgrading to an older version (npm i react-native-fcm@16.2.0)

EDIT: In my case, seems like the issue was associated with the following commit #1057 Specifically, changing: - compile "com.android.support:support-core-utils:27.1.1" + compile "com.android.support:support-core-utils:28.0.0"

1reaction
bizttacommented, Dec 28, 2018

@paalex thanks a lot 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android assemble release fails with new Gradle version (RN ...
I've updated my project to RN 0.57.4, which also required an update of the Gradle version being used. Since then building for release...
Read more >
React Native Android build failure with different errors without ...
Reason for Failures : The build failures for Android was due to the publish of the React Native version 0.71.0-rc0 to Maven and...
Read more >
Dealing With Problems With Building the App & Detox
This page is about issues related to building the app, typically triggered when running detox build (and not detox test , for example)....
Read more >
How to add app icons in React Native Android - Harry Moreno
Unzip the file on your machine. Then drag over the images you want to your /android/app/src/main/res/ folder. Make sure to put each image...
Read more >
gradle build failed with unknown error. see logs for the "run ...
This is because android.enableR8 is deprecated. To remove it from your gradle.properties file you have to go to Project Settings > Player >...
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