无法将应用程序安装到用targetsdkversion指定的设备:tiramisu- android
我目前正在对Android 13 Tiramisu进行一些测试,并且很难在设备上安装该应用程序。 我已经在Android Studio中安装了Android Tiramisu Preview(Rev.4)。 我创建了一个示例应用程序,并将其配置如下,
// build.gradle
android {
compileSdkPreview "android-Tiramisu"
defaultConfig {
applicationId "com.example.myapplication"
minSdk 16
targetSdkPreview "Tiramisu"
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
...
然后尝试将此应用程序安装在我的 Android 12 (不是Tiramisu)设备上。 当我这样做时,我在build.gradle中得到以下错误
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_OLDER_SDK
List of apks:
[0] '/Users/myuser/dev/sample/MyApplication/app/build/outputs/apk/debug/app-debug.apk'
The application's minSdkVersion is newer than the device API level.
,我已经指定了minsdk 16
,因此应该可以在Android 12设备上安装该应用程序。 我该如何解决这个问题? (当TargetsDkversion设置为Tiramisu以外的任何事物时,没有发生此问题)
I am currently doing some testing on Android 13 Tiramisu and am having trouble getting the app to install on my device.
I have installed Android Tiramisu Preview (Rev.4) in Android Studio.
I created a sample app and configured it as follows
// build.gradle
android {
compileSdkPreview "android-Tiramisu"
defaultConfig {
applicationId "com.example.myapplication"
minSdk 16
targetSdkPreview "Tiramisu"
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
...
I then tried to install this app on my Android 12 (not Tiramisu) device.
When I did so, I got the following error
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_OLDER_SDK
List of apks:
[0] '/Users/myuser/dev/sample/MyApplication/app/build/outputs/apk/debug/app-debug.apk'
The application's minSdkVersion is newer than the device API level.
In build.gradle, I have specified minSdk 16
, so it should be possible to install the app on an Android 12 device.
How can I solve this problem?
(This problem did not occur when targetSdkVersion was set to anything other than Tiramisu)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是按预期工作的:使用Android的预释放版本的定位 /编译仅在SDK最终之前使用预发行设备。返回的错误可能更清晰,因为它现在误导了。
This is working as intended: targeting / compile with a pre-release version of Android will only work on pre-release device, before SDK is final. The error returned could be clearer, as it is misleading right now.