I am working on a React Native app where I included some expo libraries (bare workflow). I had successfully used expo-location, but now after I installed also expo-camera, the app won't build anymore with npm run android, did not try yet on ios.
It will crash at :expo-permissions:compileDebugKotlin step.
I did find the problem on another forum, they were saying to update the buildToolsVersion from build.gradle to 29.0.2 but it already was on 29.0.2. Then I updated react-native-unimodules which is required to use expo libraries and contains expo-permissions. It didn't work. Right now, my current versions of libs are:
"react-native-unimodules": "^0.12.0"
"expo-permissions": "~10.0.0"
"expo-camera": "^9.1.1"
Do you have any ideas? Did someone met this problem also?
Thanks
A more elaborate stacktrace is this:
Task :expo-permissions:compileDebugKotlin FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
153 actionable tasks: 4 executed, 149 up-to-date
e: app\node_modules\expo-permissions\android\src\main\java\expo\modules\permissions\PermissionsService.kt: (16, 40): Unresolved reference: PermissionAwareActivity
e: app\node_modules\expo-permissions\android\src\main\java\expo\modules\permissions\PermissionsService.kt: (170, 17): Unresolved reference: PermissionAwareActivity
e: app\node_modules\expo-permissions\android\src\main\java\expo\modules\permissions\PermissionsService.kt: (236, 19): Unresolved reference: PermissionAwareActivity
e: app\node_modules\expo-permissions\android\src\main\java\expo\modules\permissions\PermissionsService.kt: (237, 62): Too many arguments for public final fun requestPermissions(@NonNull p
0: Array<(out) String!>, p1: Int): Unit defined in android.app.Activity
e: app\node_modules\expo-permissions\android\src\main\java\expo\modules\permissions\PermissionsService.kt: (237, 64): Cannot infer a type for this parameter. Please specify it explicitly.
e: app\node_modules\expo-permissions\android\src\main\java\expo\modules\permissions\PermissionsService.kt: (237, 77): Cannot infer a type for this parameter. Please specify it explicitly.
e: app\node_modules\expo-permissions\android\src\main\java\expo\modules\permissions\PermissionsService.kt: (237, 97): Cannot infer a type for this parameter. Please specify it explicitly.
FAILURE: Build failed with an exception.
You may not want to take the version being referenced by others online, but, instead take the version of what you have installed locally, which would vary depending on when you last updated your Android SDK.
On Windows you can look up your SDK version (tools version):
Probably *nix systems will have a similar SDK path (did not check):