REACT - NATIVE "Build failed app: processReleaseResources"

1

I am generating an apk with react-native and I run it in the Android emulator and even in adb directly on a device and it does not generate any errors.

but when executing the command:

gradlew assembleRelease

to generate the apk.

throws me the following error:

    
asked by Revsky01 05.04.2018 в 21:31
source

1 answer

0

The message expresses it clearly. Failure to execute aapt

Short answer:

Make aapt executable

Answer Slightly longer:

1) Execute cd android && ./gradlew clean && ./gradlew assembleDebug --stacktrace . The result will show the version of the compilation tool where you will find the correct aapt to make the executable and the path to it. for example: Cannot run program "/home/user/Android/Sdk/build-tools/25.0.3/aapt" (in directory "/home/user/testproject/node_modules/react-native-maps/lib/android"): error=13, Permission denied

2) Right-click on the 'aapt' file, click on the permissions, click on the checkbox marked 'Run'

3) Run ./gradlew clean && ./gradlew assembleDebug or ./gradlew assembleDebug --stacktrace again and I think it should work.

Something else you can verify is:

Enter the folder node_modules/react-native-maps/lib/android and edit the file build.gradle with which corresponds compileSdkVersion , buildToolsVersion , minSdkVersion , and targetSdkVersionde tus {root}/android/app level build.gradle versions.

A problem is a long file path. During the "compilation"

react-native run-android

See this information can be useful.

    
answered by 05.04.2018 / 21:41
source