【发布时间】:2020-11-29 00:49:08
【问题描述】:
我当前在 React Native 上的 android target sdk 是 28,但 Play Store 显示将其更新到 29。 于是我在 android/build.gradle 中做了如下改动
buildscript {
ext {
googlePlayServicesVersion = "16.0.0"
firebaseVersion = "17.3.4"
buildToolsVersion = "28.0.3" //changed to 29.0.3
minSdkVersion = 16
compileSdkVersion = 28 //changed to 29
targetSdkVersion = 28 // changed to 29
supportLibVersion = "28.0.0"
}
}
但是现在当我运行 npx react-native run-android 我得到以下错误。
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find com.android.support:support-v4:29.0.0.
Required by:
project :app
project :app > project :react-native-firebase
> Could not find com.android.support:support-v4:29.0.0.
Required by:
project :app > com.google.android.gms:play-services-basement:16.2.0
我正在使用 react-native-firebase v5
【问题讨论】:
-
这方面有什么更新吗?在这里遇到同样的问题
-
您正在使用 supportLibVersion = "28.0.0" 将其更改为 29.0.0。如果它仍然显示错误而不是添加 29 的可用版本
-
没有支持库 29.需要迁移到androidX。
标签: android firebase react-native sdk react-native-firebase