从这里尝试了所有解决方案,但仍然不起作用。你能帮我吗?没有案例。我使用的是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
并更新compileSdkVersion
和targetSdkVersion
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 上运行