Error:(1, 0) Plugin is too old, please update to a more recent version,
or set ANDROID_DAILY_OVERRIDE environment variable to
"f4a0bcdad02706f1af97b485d6a6a0c5e7d9a560". Fix plugin version and sync project
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.app.xxxxxx"
minSdkVersion 15
targetSdkVersion 21
versionCode 2
versionName "2.0"
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
signingConfig signingConfigs.config
debuggable true
jniDebuggable false
minifyEnabled false
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:recyclerview-v7:21.0.+'
}
Update your Gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.app.xxxxxx"
minSdkVersion 15
targetSdkVersion 23
versionCode 2
versionName "2.0"
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
signingConfig signingConfigs.config
debuggable true
jniDebuggable false
minifyEnabled false
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
}
Also Your Gradle version
//You Used Above Version Also
classpath 'com.android.tools.build:gradle:2.1.0'
its because your gradle plugin is too old, you need to update it to latest version.
Download the latest Gradle from here
You will need run sdk manager and check for updated revisions.
In Project level build.gradle:
Replace:
classpath 'com.android.tools.build:gradle:1.1.0'
with:
classpath 'com.android.tools.build:gradle:2.1.2'
and in the app level build.gradle which you have posted above:
Replace:
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:recyclerview-v7:21.0.+'
With:
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
Related
I imported a ui-library to an old project in android studio. Everything goes fine until I add compile project(':Android Library' to build.gradle of my app module. Here is the setting in build.gradle of app and library respectively.
App
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.chimaera.AppName"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-core-ui:25.3.1'
compile 'com.android.support:design:25.3.1'
compile project(':MaterialDesign')
testCompile 'junit:junit:4.12'
Library module
android {
compileSdkVersion 22
buildToolsVersion '25.0.0'
defaultConfig {
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
compile 'com.nineoldandroids:library:2.4.+'
compile 'com.android.support:support-v4:22.+'
compile fileTree(dir: 'libs', include: '*.jar')
(I forgot to paste the error.) Here is the error tips.
enter image description here
enter image description here
It jumped to a value.xml seems unrelated to this error.
I set minifyEnabled to false for release but keep debug setting blank. Do I need to set debug as well. Is there anything wrong with version settings to cause imported error?
I can't debug my Java classes or Kotlin files, all breakpoints has "x" signature , but it works for cpp class files
I'm using
Android Studio version 2.2.2
OS version macOS siera 10.12
Gradle version 2.2.2
this is my Module Build.gradle file
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "awesomethings.ge.takeapic"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-std=c++11 -fexceptions"
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.1'
testCompile 'junit:junit:4.12'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'com.github.bumptech.glide:glide:3.7.0'
}
repositories {
mavenCentral()
}
I have the latest support library installed in my SDK.
gradle file
defaultConfig {
applicationId "com.example.win.dat_2"
minSdkVersion 19
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'])
compile 'com.android.support:appcompat-v7:23.1.1'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations' })
}
In app gradle add this to defaultConfig
multiDexEnabled = true
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.app.threedb"
minSdkVersion 15
// targetSdkVersion 21
versionCode 1
versionName "1.0"
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:recyclerview-v7:21.0.+'
}
This code I have written in gradle but few functionality like creating new message and adding image from gallery is not working in kitkat version. Please help
I have the following gradle file in my android app:
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.test.forum"
minSdkVersion 16
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
//configurations {
// all*.exclude group: 'com.android.support', module: 'support-v4'
//}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:19+'
compile 'org.java-websocket:Java-WebSocket:1.3.0'
}
and the bug output is Error code: 2; Output: UNEXPECTED TOP-LEVEL EXCEPTION.
When I uncomment the configurations part of the file I get Can't find package v4 (support) although I have it installed from the sdk. Any ideas on how I can solve this?