apply plugin: \'com.android.application\'
android {
compileSdkVersion 23
buildToolsVersion \"22.0.1\"
defaultConfig {
applicationId \"com.nusec
In my case it was a to long (more that 100 chars) name of a file in Assets
For me the issue was being caused by a circular reference in an xml file. Lint would usually flag the issue, unless instructed not too. Check for:
tools:ignore="ResourceCycle"
In your build.gradle,
applicationId "com.company.app"
Should match in AndroidManifest.xml:
package="com.company.app"
I was getting this same error because they didn't match.
Finally I got solution for this issue after going through so many articles.
This issue is because of sdk tools Version mismatch.
The targeted sdk version in build.gradle file must match with the sdk version which you installed.
My solution came from here
REMOVE ALL IMAGES FROM RES/ DRAWABLE THAT YOU DON'T NEED
https://github.com/facebook/react-native/issues/19239
Credit for --> ZeroCool00
For those who are doing this before generating apk
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
it generate unnecessary drawable images in drawable folder. so make sure to remove it and try again.
android-> app -> src -> main -> res -> drawable
After so much searching, I found this solution
In android/gradle.properties
add
android.enableAapt2=false