Red*_*ant 10 android gradle react-native react-native-firebase
我已经安装了react-native-firebase和react-native-camera.当play-services -vision被卡住时相机很好12.0.1
,但是我遇到了这个错误(错误更新属性googleVisionBarcodeDetectorEnable) https://github.com/react-native-community/react-native-camera/issues/1844这需要升级到15.0.2
.
它看起来像有谷歌播放服务,并在火力地堡冲突play-services-vision
被撞可达15.0.2
来自12.0.1
:
Dependency failing: com.google.android.gms:play-services-flags:15.0.1 -> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.0.1.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.firebase:firebase-messaging@17.3.4
-- Project 'app' depends onto com.google.android.gms:play-services-base@16.0.1
-- Project 'app' depends onto com.google.firebase:firebase-core@16.0.6
-- Project 'app' depends onto com.google.android.gms:play-services-vision@15.0.2
Run Code Online (Sandbox Code Playgroud)
我试过com.google.android.gms:play-services-vision@16.2.0
但它给了我exceed 64k methods
错误.最高可达17.0.2会导致版本冲突com.google.android.gms:play-services-basement
.
任何使用react-native-firebase和react-native相机的人?你能告诉我如何解决这个版本的冲突问题吗?
这是android/app/build.gradle中的依赖项
dependencies {
implementation (project(':react-native-camera')) {
exclude group: "com.google.android.gms"
implementation "com.android.support:exifinterface:${rootProject.ext.supportLibVersion}"
implementation ('com.google.android.gms:play-services-vision:12.0.1') {
force = true
}
}
implementation project(':react-native-gesture-handler')
implementation project(':react-native-webview')
implementation project(':react-native-fast-image')
implementation project(':react-native-google-signin')
implementation project(':react-native-firebase')
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation ('com.google.android.gms:play-services-base:16.0.1')
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.5@aar') {
transitive = true
}
implementation(project(':react-native-google-signin')) {
exclude group: "com.google.android.gms" // very important
}
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation 'com.facebook.react:react-native:+'
implementation project(':react-native-sqlite-storage')
implementation 'me.leolin:ShortcutBadger:1.1.21@aar'
implementation 'com.facebook.fresco:animated-gif:1.10.0'
}
Run Code Online (Sandbox Code Playgroud)
在android/build.gradle中的Ext
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 19
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "27.1.1"
}
Run Code Online (Sandbox Code Playgroud)
包:
"react-native-camera": "^1.6.4",
"react-native-firebase": "^5.1.1",
Run Code Online (Sandbox Code Playgroud)
小智 8
您需要更新gms的版本:play-services-vision.
implementation 'com.google.android.gms:play-services-vision:17.0.2'
归档时间: |
|
查看次数: |
2507 次 |
最近记录: |