Android 为什么Minsdk版本太新了?

Android 为什么Minsdk版本太新了?,android,android-11,Android,Android 11,正在尝试测试与新Bubbles api相关的示例应用程序 Installation did not succeed. The application could not be installed: INSTALL_FAILED_OLDER_SDK The application's minSdkVersion is newer than the device API level. build.gradle compileSdkVersion 'android-R' buildToolsVers

正在尝试测试与新Bubbles api相关的示例应用程序

Installation did not succeed.
The application could not be installed: INSTALL_FAILED_OLDER_SDK
The application's minSdkVersion is newer than the device API level.
build.gradle

compileSdkVersion 'android-R'
buildToolsVersion "29.0.3"
defaultConfig {
    applicationId "com.example.bubbles"
    minSdkVersion 'Q'
    targetSdkVersion 'android-R'
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
这是我的虚拟设备。我运行的是
Pixel 3 API R

这难道不足以在此设备上运行API 30应用程序吗?我不确定冲突是什么。谢谢。

更换:

minSdkVersion 'Q'
targetSdkVersion 'android-R'
与:

Q是2019年的版本,所以这不是你想要的
minSdkVersion
。而
android-R
不应被识别为有效的
targetSdkVersion
值-该语法仅适用于
compileSdkVersion


(是的,这一切都是一团糟,多年来一直如此……

再次感谢。我需要在文档中找到这个地方。@AndroidDev:,尽管那里没有显示
minSdkVersion
。IIRC,将
targetSdkVersion
设置为
R
会自动强制
minSdkVersion
R
。再次感谢@你确定吗?我使用apktool反编译了一个apk,它显示了
21
minsdk版本,但它仍然没有正确安装。@xxturboxx:过去几年版本的构建工具都是这样。也许他们只是选择将其烘焙到操作系统本身,而忽略您的
minSdkVersion
,如果您有预发布的
targetSdkVersion
minSdkVersion 'R'
targetSdkVersion 'R'