У меня возникла эта ошибка при попытке создать приложение Expo на Android с помощью expo-camera@14.0.6. На iOS работает нормально.
ошибка
Код: Выделить всё
> Task :expo-camera:compileDebugKotlin
e: file:///Users/ha.ngo/Documents/GitHub/StrokeWear/app/node_modules/expo-camera/android/src/main/java/expo/modules/camera/ExpoCameraView.kt:279:25 Unresolved reference: raw
e: file:///Users/ha.ngo/Documents/GitHub/StrokeWear/app/node_modules/expo-camera/android/src/main/java/expo/modules/camera/next/ExpoCameraView.kt:424:25 Unresolved reference: raw
e: file:///Users/ha.ngo/Documents/GitHub/StrokeWear/app/node_modules/expo-camera/android/src/main/java/expo/modules/camera/next/analyzers/BarcodeAnalyzer.kt:54:81 Type mismatch: inferred type is String? but (Mutable)List! was expected
e: file:///Users/ha.ngo/Documents/GitHub/StrokeWear/app/node_modules/expo-camera/android/src/main/java/expo/modules/camera/next/analyzers/BarcodeAnalyzer.kt:54:86 Type mismatch: inferred type is MutableList but Int was expected
e: file:///Users/ha.ngo/Documents/GitHub/StrokeWear/app/node_modules/expo-camera/android/src/main/java/expo/modules/camera/next/analyzers/BarcodeAnalyzer.kt:54:113 Too many arguments for public constructor BarCodeScannerResult(p0: Int, p1: String!, p2: (Mutable)List!, p3: Int, p4: Int) defined in expo.modules.interfaces.barcodescanner.BarCodeScannerResult
> Task :expo-camera:compileDebugKotlin FAILED
package.json
Код: Выделить всё
"expo": "^50.0.6",
"expo-camera": "14.0.6",
"react-native": "0.73.4",
Код: Выделить всё
{ expo: {
"plugins": [
[ "expo-camera",
{
"cameraPermission": "Allow $(PRODUCT_NAME) to access your camera",
"microphonePermission": "Allow $(PRODUCT_NAME) to access your microphone",
"recordAudioAndroid": true
}
]
]
}
}
- prebuild clean, ./gradlew clean, etc
- Add kotlin plugin version to android/build.graddle
- Add maven to android/build.gradle
Источник: https://stackoverflow.com/questions/781 ... lin-failed