react-native-mauron85-背景地理定位错误
尝试为生产构建我的react native(运行./gradlew AssemblerEase)时出现以下错误 /node_modules/react-native-mauron85-background-geolocation/android/common/src/oreo/java/com/marianhello/bgloc/NotificationHelper.java:4:错误:找不到符号 导入android.app.NotificationChannel; ^ 符号:类别通知频道 位置:包android.app 任务“:react-native-mauron85-background-geolocation-common:compileoreoreeleaseJavaWithJavaC”的执行失败react-native-mauron85-背景地理定位错误,react-native,react-native-android,React Native,React Native Android,尝试为生产构建我的react native(运行./gradlew AssemblerEase)时出现以下错误 /node_modules/react-native-mauron85-background-geolocation/android/common/src/oreo/java/com/marianhello/bgloc/NotificationHelper.java:4:错误:找不到符号 导入android.app.NotificationChannel; ^ 符号:类别通知频道 位
以前有人遇到过这个错误吗?只要添加解决我问题的方法,以防有人遇到同样的问题 在撕下很多头发后(尽管我没有),我找到了一个解决办法。不确定是否对其他人有用,你可以试试 在android/build.gradle中添加以下代码
allprojects {
repositories {
mavenLocal()
jcenter()
maven { url "https://maven.google.com" }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
ext {
compileSdkVersion = 26
targetSdkVersion = 26
buildToolsVersion = "26.0.2"
supportLibVersion = "26.1.0"
googlePlayServicesVersion = "11.8.0"
}
并确保已安装依赖项。Me可能会出现此错误。你运气好吗?你找到什么解决办法了吗?你有什么例子吗?我有很多链接和示例,但找不到应该调用哪种方法和在哪里