vision-camera-code-scanner icon indicating copy to clipboard operation
vision-camera-code-scanner copied to clipboard

I can't generate my APK

Open geralda05 opened this issue 3 years ago • 5 comments

I'm using React Native 0.7 and the Android SDK 31

I'm getting this error when I run "assembleRelease":

Task :vision-camera-code-scanner:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':vision-camera-code-scanner:verifyReleaseResources'.

A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action Android resource linking failed ERROR:C:\Users\Tecnoandina.gradle\caches\transforms-3\efc5fbdc5cddabff1e6dbe6ad771c56d\transformed\core-1.7.0\res\values\values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found. *

Can you help me with that? Before I had the error with other package, and they fixed it doing the following: https://github.com/kenjdavidson/react-native-bluetooth-classic/issues/202

Now I only have the problem using this plugin (vision-camera-code-scanner)

geralda05 avatar Sep 27 '22 17:09 geralda05

VisionCameraCodeScanner_compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: fallbackVersion)        
VisionCameraCodeScanner_minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: fallbackVersion)
VisionCameraCodeScanner_targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: fallbackVersion)

I resolve by putting these in root build.gradle file

mthinh avatar Oct 11 '22 04:10 mthinh

Hi @mthinh, Can you provide more detail on your solution please. You mean the root build.gradle of your projet or of the dependency ?

You put it like this at the end of the file or inside buildscript {} or something else ?

Thank you.

MaximeLozach avatar Oct 11 '22 09:10 MaximeLozach

Worked for me: android/build.gradle

buildscript {
    ext {
        ...
        VisionCameraCodeScanner_targetSdkVersion = 31 //add
        VisionCameraCodeScanner_compileSdkVersion = 31 //add
    }
    ...
}

Then get build in offline mode

sahinboga avatar Oct 31 '22 11:10 sahinboga

Worked for me: android/build.gradle

buildscript {
    ext {
        ...
        VisionCameraCodeScanner_targetSdkVersion = 31 //add
        VisionCameraCodeScanner_compileSdkVersion = 31 //add
    }
    ...
}

Then get build in offline mode

it's working TYSM

anshif10 avatar Dec 05 '22 07:12 anshif10

Worked for me: android/build.gradle

buildscript {
    ext {
        ...
        VisionCameraCodeScanner_targetSdkVersion = 31 //add
        VisionCameraCodeScanner_compileSdkVersion = 31 //add
    }
    ...
}

Then get build in offline mode

Thanks, this works for me

imamrobani avatar Aug 24 '23 01:08 imamrobani