java - compileReleaseJavaWithJavac 错误试图 release.sh 我的应用程序
问题描述
我正在尝试release.sh
一个应用程序,但它返回此错误:
> Task :react-native-camera:compileMlkitReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/myuser/project/node_modules/react-native-camera/android/src/main/java/com/google/android/cameraview/Camera2.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
> Task :react-native-device-info:compileReleaseJavaWithJavac FAILED
/Users/myuser/project/node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java:368: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
^
symbol: variable P
location: class VERSION_CODES
/Users/myuser/project/node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java:370: error: cannot find symbol
locationEnabled = mLocationManager.isLocationEnabled();
^
symbol: method isLocationEnabled()
location: variable mLocationManager of type LocationManager
Note: /Users/myuser/project/node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-device-info:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
我进行了一些搜索,也许这些信息会有所帮助:
安卓/bild.gradle
buildscript {
ext {
buildToolsVersion = "27.0.3"
minSdkVersion = 23
compileSdkVersion = 27
targetSdkVersion = 26
supportLibVersion = "27.1.1"
playServicesVersion = "16.0.0"
}
我的 SDK 管理器有
- Android API 28(仅平台 + 源)
- Android 8.1(仅限平台+来源)
- Android 8.0(仅限平台+来源)
任何想法?
解决方案
推荐阅读
- c# - 如何使用 ArrayList 解析 c# 中的结构化文件?
- android - Android启动屏幕灰色过渡到活动
- plsql - 使用存储过程执行 PL/SQL 代码时出现问题
- angular - Angular Reactive Form - Form Array - 如何使用扩展运算符设置 FormArray?
- reactjs - Ant Design React 中的回调按钮单击事件
- angular - 类型'可观察的
>' 不可分配给类型 'Observable '。键入'UI [] | 承诺 ' 不可分配给类型 'UI[]' - php - 在 compuser 更新时更新 laravel 5.2 -> 5.6 错误
- python - 如何在 Python 中设置固定的营业时间。我希望开放时间在欧盟时间 00.01 到 11.00 之间
- wordpress - 使用语言切换器时如何自定义css
- python - 如何从奖励视频广告中奖励 kivy 中的用户积分