我的React Native应用当前的Android目标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