在android studio 新创建项目,居然在运行时显示“Installation failed with message INSTALL_FAILED_OLDER_SDK.,It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.”,先贴出我的build.gradle :
apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.example.demo.rong_demo2" minSdkVersion 23 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) }
这是创建项目时,自动创建的gradle 文件 ,没弄明白怎么回事, 之后 将minSdkVersion 的23改为15,就能正常运行了,具体什么原因还不明白,先mark起来,路过的大神帮解答一下吧!