zsajjad / react-native-text-detector

Text Detector from image for react native using firebase MLKit on android and Tesseract on iOS
MIT License
222 stars 60 forks source link

Execution failed for task ':react-native-text-detector:verifyReleaseResources' #20

Closed jairrc closed 5 years ago

jairrc commented 5 years ago

Execution failed for task ':react-native-text-detector:verifyReleaseResources'

I'm trying to generate the APK file and when it reaches 96%, this error, below, occurs. I could not find a solution and I need to urgently generate the update of the App. Has anyone gone through this and can point out a possible solution?

Android Studio version: 3.4 Gradle version: 5.1.1 react-native-cli: 2.0.1 react-native: 0.55.4 npm: 6.9.0

dependencies { classpath 'com.android.tools.build:gradle:3.4.0' classpath 'com.google.gms:google-services:4.1.0' classpath 'com.bugsnag:bugsnag-android-gradle-plugin:4.+' }

ext { buildToolsVersion = "27.0.3" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 28 supportLibVersion = '26.1.0' googlePlayServicesVersion = "16.+" firebaseVersion = "17.6.0"
}


### The error:

Task :react-native-text-detector:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

jairrc commented 5 years ago

I was able to generate my APK by making the following changes in the build.gradle file of the react-native-text-detector, in the path bellow:

node_modules\react-native-text-detector\android\build.gradle

//ORIGINAL // android { // compileSdkVersion 27 // buildToolsVersion "23.0.1" // // defaultConfig { // minSdkVersion 16 // targetSdkVersion 27 // versionCode 1 // versionName "1.0" // } // lintOptions { // abortOnError false // } // }

//NEW android { compileSdkVersion 28 buildToolsVersion "28.0.3" defaultConfig { minSdkVersion 16 targetSdkVersion 28 versionCode 1 versionName "1.0" } lintOptions { abortOnError false } }

hammooooody commented 5 years ago

Thank you sir! @jairrc