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

Cannot build on android

Open godievski opened this issue 3 years ago • 5 comments

I cannot build the app on android using react-native 0.68

This is the error I got :

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:/Users/gd/.gradle/caches/transforms-3/b55f01d48cf84539d4df01ab77fef1b0/transformed/core-1.7.0/res/values/values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.

This is my package.json :

{ "@gorhom/portal": "^1.0.14", "@react-native-async-storage/async-storage": "^1.17.9", "@react-native-community/hooks": "^2.8.1", "@react-native-community/netinfo": "^8.3.0", "@react-native-masked-view/masked-view": "^0.2.7", "@react-navigation/bottom-tabs": "^6.3.2", "@react-navigation/elements": "^1.3.3", "@react-navigation/native": "^6.0.11", "@react-navigation/native-stack": "^6.7.0", "@react-navigation/stack": "^6.2.2", "@reduxjs/toolkit": "^1.8.5", "@sentry/react-native": "^4.2.4", "@shopify/restyle": "^2.1.0", "axios": "^0.27.2", "events": "^3.3.0", "formik": "^2.2.9", "i18n-iso-countries": "^7.5.0", "i18n-js": "^3.9.2", "moment": "^2.29.4", "react": "17.0.2", "react-native": "0.68.2", "react-native-config": "^1.4.6", "react-native-country-flag": "^1.1.6", "react-native-device-info": "^10.0.2", "react-native-gesture-handler": "^2.5.0", "react-native-localize": "^2.2.3", "react-native-reanimated": "^2.10.0", "react-native-safe-area-context": "^4.3.3", "react-native-screens": "^3.16.0", "react-native-sound": "^0.11.2", "react-native-splash-screen": "^3.3.0", "react-native-svg": "^13.0.0", "react-native-vector-icons": "^9.2.0", "react-native-vision-camera": "^2.14.1", "react-query": "^3.39.2", "react-redux": "^8.0.2", "redux": "^4.2.0", "redux-persist": "^6.0.0", "redux-thunk": "^2.4.1", "use-debounce": "^8.0.3", "vision-camera-code-scanner": "^0.2.0", "yup": "^0.32.11" }

godievski avatar Aug 23 '22 14:08 godievski

https://github.com/rodgomesc/vision-camera-code-scanner/issues/90

BogdanTaranenko avatar Aug 23 '22 22:08 BogdanTaranenko

@BogdanTaranenko Thank you. My build works now.

Using: "react": "18.2.0", "react-native": "^0.69.4", "vision-camera-code-scanner": "^0.2.0"

Android 11

lfrallon avatar Aug 24 '22 18:08 lfrallon

@BogdanTaranenko Thank you. My build also works now.

Using: "react": "17.0.2", "react-native": "0.68.2", "vision-camera-code-scanner": "^0.2.0"

Android 12

uniquejava avatar Aug 30 '22 05:08 uniquejava

adding below code in android/build.gradle should fix it. There is an active PR for this:

buildscript {
    ext {
        ...
        ...
        VisionCameraCodeScanner_targetSdkVersion = 31
        VisionCameraCodeScanner_compileSdkVersion = 31
     
       ....

krisidmisso avatar Oct 03 '22 18:10 krisidmisso