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.

Error Generating APK release AAPT: error: resource string/app_name

See original GitHub issue

Coding Questions

I get stuck when trying to generate APK. I still got this error and I dont know why

> Task :app:processReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processReleaseResources'.
> Android resource linking failed
  /home/maelfosso/Documents/Projects/Apps/Guitou/Customers/jnadia40/ASQQuestionnaire/android/app/build/intermediates/merged_manifests/release/AndroidManifest.xml:15: AAPT: error: resource mipmap/ic_launcher (aka com.asqquestionnaire:mipmap/ic_launcher) not found.
      
  /home/maelfosso/Documents/Projects/Apps/Guitou/Customers/jnadia40/ASQQuestionnaire/android/app/build/intermediates/merged_manifests/release/AndroidManifest.xml:15: AAPT: error: resource string/app_name (aka com.asqquestionnaire:string/app_name) not found.
      
  /home/maelfosso/Documents/Projects/Apps/Guitou/Customers/jnadia40/ASQQuestionnaire/android/app/build/intermediates/merged_manifests/release/AndroidManifest.xml:15: AAPT: error: resource mipmap/ic_launcher_round (aka com.asqquestionnaire:mipmap/ic_launcher_round) not found.
      
  /home/maelfosso/Documents/Projects/Apps/Guitou/Customers/jnadia40/ASQQuestionnaire/android/app/build/intermediates/merged_manifests/release/AndroidManifest.xml:15: AAPT: error: resource style/AppTheme (aka com.asqquestionnaire:style/AppTheme) not found.
      
  /home/maelfosso/Documents/Projects/Apps/Guitou/Customers/jnadia40/ASQQuestionnaire/android/app/build/intermediates/merged_manifests/release/AndroidManifest.xml:23: AAPT: error: resource string/app_name (aka com.asqquestionnaire:string/app_name) not found.
      
  error: failed processing manifest.

* 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 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2m 33s

https://stackoverflow.com/questions/tagged/react-native

https://stackoverflow.com/questions/55822449/errors-when-generating-release-apk-error-duplicate-resources-aapt-error-res

I was on stackoverflow but no response was good until now

How to solve this please ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10

github_iconTop GitHub Comments

9reactions
Santu1245commented, Apr 27, 2019

As the Error Message says:

Android resource linking failed the files that are present in the values folder might not properly be linked up with AndroidManifest files

Check if the files present in values folder string, style, color, etc are properly mapped in AndroidManifest.xml

If no, then Map it.

Then run the following commands: cd android ./gradlew clean cd .. and then run: react-native run-android --variant=release

4reactions
BrianH2commented, Sep 11, 2019

For me I had accidentally deleted android/app/src/main/res/values/strings.xml and android/app/src/main/res/values/styles.xml when replacing the app icons. Adding them back in fixed it.

Example strings.xml:

<resources>
    <string name="app_name">APP_NAME</string>
</resources>

Example styles.xml:

<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="android:textColor">#000000</item>
    </style>

</resources>
Read more comments on GitHub >

github_iconTop Results From Across the Web

AAPT: error: resource string/app_name not found - Stack ...
I'm using Atom as an editor with Genymotion for Emulator. The code is working very well. But it's I get stuck when is...
Read more >
Build multiple APKs - Android Developers
One way to reduce the size of your APK is to create multiple APKs that contain files for specific screen densities or ABIs....
Read more >
Error: resource string/fb_app_name (aka string ... - Ionic Forum
Trying to package a build (that works fine locally on my machine) via the ionic pro dashboard and I'm getting this error in...
Read more >
How to Generate a React Native Release Build APK for Android
Execution failed for task ':app:processReleaseResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt.
Read more >
mergeReleaseResources FAILED, failed to read PNG signature
png: error: file failed to compile. com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed. C:\Users\andyw\ ...
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