我正在开发一个 React Native 应用程序,其中包含了一些 expo 库(裸工作流)。我已经成功使用了expo-location
,但是现在我也安装了之后expo-camera
,该应用程序将不再构建npm run android
,还没有在ios上尝试过。
:expo-permissions:compileDebugKotlin
它会在一步崩溃。
我确实在另一个论坛上发现了问题,他们说要更新buildToolsVersion
from build.gradle
to29.0.2
但它已经在29.0.2
. 然后我更新react-native-unimodules
了使用 expo 库所需的内容并包含 expo 权限。它没有用。现在,我当前的库版本是:
"react-native-unimodules": "^0.12.0"
"expo-permissions": "~10.0.0"
"expo-camera": "^9.1.1"
你有什么想法?有人也遇到过这个问题吗?
谢谢
更详细的堆栈跟踪是这样的:
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.