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 failure -- in assembleRelease

See original GitHub issue

I am getting this error everytime when building release app but it works fine in debug app

> Task :react-native-dialogflow:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-dialogflow:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     /home/ayan/.gradle/caches/transforms-2/files-2.1/a4aa75ad6ccbe3ab81ae94031ca63766/appcompat-1.0.2/res/values-v26/values-v26.xml:5:5-8:13: AAPT: error: resource android:attr/colorError not found.
         
     /home/ayan/.gradle/caches/transforms-2/files-2.1/a4aa75ad6ccbe3ab81ae94031ca63766/appcompat-1.0.2/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
         
     /home/ayan/.gradle/caches/transforms-2/files-2.1/a4aa75ad6ccbe3ab81ae94031ca63766/appcompat-1.0.2/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
         
     /home/ayan/.gradle/caches/transforms-2/files-2.1/a4aa75ad6ccbe3ab81ae94031ca63766/appcompat-1.0.2/res/values-v28/values-v28.xml:5:5-8:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
         
     /home/ayan/.gradle/caches/transforms-2/files-2.1/a4aa75ad6ccbe3ab81ae94031ca63766/appcompat-1.0.2/res/values-v28/values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
         
     /home/ayan/.gradle/caches/transforms-2/files-2.1/99e2c2cf9508116578d0bb5e82ff59c6/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontStyle not found.
         
     /home/ayan/.gradle/caches/transforms-2/files-2.1/99e2c2cf9508116578d0bb5e82ff59c6/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/font not found.
         
     /home/ayan/.gradle/caches/transforms-2/files-2.1/99e2c2cf9508116578d0bb5e82ff59c6/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontWeight not found.
         
     /home/ayan/.gradle/caches/transforms-2/files-2.1/99e2c2cf9508116578d0bb5e82ff59c6/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
         
     /home/ayan/.gradle/caches/transforms-2/files-2.1/99e2c2cf9508116578d0bb5e82ff59c6/core-1.0.1/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex not found.
         

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 4m 9s
471 actionable tasks: 401 executed, 70 up-to-date

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
attachi20commented, Jan 27, 2021

I have the same problème like you

0reactions
bohdansushchakcommented, Sep 22, 2021

try add to android/build.gradle

subprojects { project ->
 afterEvaluate {
        if (project.name.contains('react-native-dialogflow')) {
            android {
                compileSdkVersion rootProject.ext.compileSdkVersion
                buildToolsVersion rootProject.ext.buildToolsVersion
                defaultConfig {
                    targetSdkVersion rootProject.ext.targetSdkVersion
                }
            }
        }
    }
}

That solved build issue for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - React native gradlew assembleRelease build failed ...
I'm encountering with this error, when run ./gradlew assembleRelease . I've tinkering about ...
Read more >
Question - Gradle Build Failed - Unity Forum
I have a fresh install of Unity 2021.3.9f1 with the Android Build Support, ... GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
Read more >
Android Build Fail - Build issue - AppGyver forums
Execution failed for task ':app:mergeReleaseResources'. A failure occurred while executing com.android.build.gradle.internal.res.
Read more >
Getting error on gradlew :app:assembleRelease on non-expo ...
[RUN_GRADLEW] Using it has no effect, and the AndroidGradle plugin optimizes dexing automatically. [RUN_GRADLEW] FAILURE: Build failed with an ...
Read more >
Oops! my project did not build - Android - Thunkable Community
Error: Command failed: cd /thunkable/androidBuildServer/…/thunkableCompanion/android/; ./gradlew AssembleRelease Cannot resolve the path to ...
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