Cordova App, minSdkVersion 30 和 error "minCompileSdk (31) specified in a"



从这里尝试了所有解决方案,但仍然不起作用。你能帮我吗?没有案例。我使用的是cordova 10.1.0

The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF / com / android / build / gradle / aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.browser: browser: 1.4.0.

您使用的是使用targetSdkVersion 31编译的androidx.browser: browser: 1.4.0.版本。为了使用此功能,您需要使您的应用程序也与版本31兼容。
转到build.gradle并更新compileSdkVersiontargetSdkVersion

android {
compileSdkVersion 31 // updated to 31
defaultConfig {
applicationId "myproject.name.testApp"
minSdkVersion 21 
targetSdkVersion 31  // updated to 31
versionCode 1
versionName "1.0"
}
}

如果您不想更新到版本31,您可以将androidx.browser降级到androidx.browser:browser:1.3.0,这在sdkVersion 30 上运行

相关内容

最新更新