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

问题描述

大家好,最近才开始涉足Android开发.我觉得这是一个非常愚蠢的问题,但因为我已经花了一个小时,所以我还是会开枪.我目前正在尝试在设备上运行一个项目,而未更改Android Studio给我的内容.我认为这张图片应该可以更好地描述我的问题:

Hi guys 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:

运行时,我得到Failure [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