本文介绍了minSdk != deviceSdk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近才开始接触 Android 开发.我觉得这是一个非常愚蠢的问题,但我还是会开枪,因为我已经在这个问题上花了一个小时.我目前正在尝试在我的设备上运行一个项目,对 Android Studio 提供的内容没有任何更改.我认为这张图片应该更好地描述我的问题:

I just recently started getting into Android development. I feel this is a very stupid question but I'll shoot anyway since I've spent an hour on this already. I am currently trying to run a project on my device, with no changes to what Android Studio gave me. I think this image should describe my problem better:

运行时出现失败[INSTALL_FAILED_OLDER_SDK].

我不明白为什么它们不兼容.相反,当 build.gradle 上的 minSdkVersion 说 15 时,为什么 minSdk 说 API 20?我试过在 manifest.xml 上添加 uses-sdk 但我认为这是不必要的,因为我的 build.gradle 文件会覆盖它(它也不起作用).

I can't understand why they are not compatible. Rather, why does minSdk say API 20 when minSdkVersion on build.gradle says 15? I've tried adding uses-sdk on manifest.xml but I figured that would be unnecessary since my build.gradle file will overwrite that (it didn't work also).

我是否在这里缺少某种设置?

Am I missing some kind of setting here?

推荐答案

出于某种原因,使用L"作为 targetSdkVersion 使得 minSdkVersion 被忽略.您应该将 targetSdkVersion 设置为 L 以外的其他内容.

For some reason, using 'L' as the targetSdkVersion makes it so the minSdkVersion is ignored. You should set the targetSdkVersion to something other than L.

这篇关于minSdk != deviceSdk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 19:54