导入android源码时出现的问题
1.Error:Android Studio Could not find method runProguard() for arguments?
解决办法:把"runProguard " 改成 "minifyEnabled"
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
2.Error:Cause:+com.android.sdklib.repository.FullRevision
发生错误的原因:依赖的仓库地址已修改
解决方法:classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'注释掉;
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
//classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
然后,在app目录下:把apply plugin: 'android-sdk-manager'注释掉
//apply plugin: 'android-sdk-manager'
apply plugin: 'android'
android {
compileSdkVersion 20
buildToolsVersion "20"
defaultConfig {
applicationId "com.daimajia.androidanimations"
minSdkVersion 8
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
}
就可以了!
上面内容为整理内容,如有侵权,请联系我,立删!