devfd / react-native-geocoder

geocoding services for react native
MIT License
430 stars 179 forks source link

Execution failed for task ':react-native-geocoder:verifyReleaseResources'. #86

Open vishalTechnoFreek opened 5 years ago

vishalTechnoFreek commented 5 years ago

I getting this issue while create release apk. Execution failed for task ':react-native-geocoder:verifyReleaseResources'.

com.android.ide.common.process.ProcessException: Failed to execute aapt

kueda commented 5 years ago

Getting something similar trying to run ./gradlew assembleRealse, Mac OS 10.12.6, Android SDK Build Tools 28.0.3, gradle 4.6, react-native 0.57.1, react-native-geocder 0.5.0:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-geocoder:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  Output:  /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found.
  /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found.
  /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
  /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values/values.xml:226: error: resource android:attr/fontStyle not found.
  /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values/values.xml:226: error: resource android:attr/font not found.
  /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/merged/release/values/values.xml:226: error: resource android:attr/fontWeight not found.
  error: failed linking references.

  Command: /Users/username/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/e7c06e161e039ba7b8bbf8be2b64c8b8/aapt2-3.2.1-4818971-osx/aapt2 link -I\
          /Users/username/Library/Android/sdk/platforms/android-25/android.jar\
          --manifest\
          /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/aapt_friendly_merged_manifests/release/processReleaseManifest/aapt/AndroidManifest.xml\
          -o\
          /var/folders/qn/0_w8cr513wl215grz8mv_6980000gn/T/aapt-5569752529559728845-out\
          -R\
          /path/to/app/node_modules/react-native-geocoder/android/build/intermediates/res/compiled/release/anim_abc_fade_in.xml.flat\

I'm pretty new to RN so my apologies if this is something obvious and/or generic, but it seems specific to react-native-geocoder.

RafilAlArs commented 5 years ago

Getting thesame when run ./gradlew assembleRealse, Mac OS 10.12.6, Android SDK Build Tools 28.0.3 FAILURE: Build failed with an exception. any solution.

update when I change the react-native-geocoder project build.gradle to apply plugin: 'com.android.library'

android { compileSdkVersion 26 buildToolsVersion "25.0.2"

defaultConfig {
    minSdkVersion 16
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }
}

}

dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "com.facebook.react:react-native:+" } change compileSdkVersion 25 to 26 and targetSdkVersion 26 let me build release this solve the problem.

luisfuertes commented 5 years ago

+1.

Change targetSdkVersion and compileSdkVersion to 26 not work for me.

Ok, my project is in target SDK 28, with 28 version it works. But in other issue post this fix:

android/build.gradle

At end add:

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion rootProject.ext.compileSdkVersion
                buildToolsVersion rootProject.ext.buildToolsVersion
            }
        }
    }
}
ad7090 commented 5 years ago

I find The solution Finally ;))))) ((( RN ))) When we get verifyReleaseResources And ':react-native-interactable:compileDebugJavaWithJavac' this message Error in Release Apk Build In Android

just Update build.gradle in Lib Npm

And Upgrade Your LibSource

android { compileSdkVersion 28 <<=== this line (to Current SDK Project)

defaultConfig {
    minSdkVersion 16
    targetSdkVersion 28   <<=== this line (to Current SDK Project)
    versionCode 1
    versionName "1.0"
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }
}

}

DeVoresyah commented 4 years ago

+1.

Change targetSdkVersion and compileSdkVersion to 26 not work for me.

Ok, my project is in target SDK 28, with 28 version it works. But in other issue post this fix:

android/build.gradle

At end add:

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion rootProject.ext.compileSdkVersion
                buildToolsVersion rootProject.ext.buildToolsVersion
            }
        }
    }
}

works for me

Danushka50 commented 3 years ago

+1.

Change targetSdkVersion and compileSdkVersion to 26 not work for me.

Ok, my project is in target SDK 28, with 28 version it works. But in other issue post this fix:

android/build.gradle

At end add:

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion rootProject.ext.compileSdkVersion
                buildToolsVersion rootProject.ext.buildToolsVersion
            }
        }
    }
}

This works for me. Thank you.