Error : cause android.compileSdkVersion is missing

来源:互联网 发布:报java培训班后悔了 编辑:程序博客网 时间:2024/06/05 17:08

好奇葩,不小心碰到这个问题了,本来好好的工程,我不小心操作发现这个出问题了

就是build.gradle文件,错误的如下

apply plugin: 'com.android.library'<span style="color:#ff6666;">apply from: 'bintray.gradle'</span>android {    compileSdkVersion 23    buildToolsVersion "23.0.1"    defaultConfig {        minSdkVersion 14        targetSdkVersion 23        versionCode 1        versionName "1.0"    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }    }}dependencies {    compile fileTree(include: ['*.jar'], dir: 'libs')    testCompile 'junit:junit:4.12'    compile 'com.android.support:appcompat-v7:23.1.0'    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'}



正确的如下,这样就不会出现标题的错误了


apply plugin: 'com.android.library'android {    compileSdkVersion 23    buildToolsVersion "23.0.1"    defaultConfig {        minSdkVersion 14        targetSdkVersion 23        versionCode 1        versionName "1.0"    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }    }}dependencies {    compile fileTree(include: ['*.jar'], dir: 'libs')    testCompile 'junit:junit:4.12'    compile 'com.android.support:appcompat-v7:23.1.0'    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'}<span style="color:#ff0000;">apply from: 'bintray.gradle'</span>



问题就在我把那个apply from从最后一行移到上边去了。。。无语

0 0
原创粉丝点击