I am building a golf score card app with android studio and last night before I shut down my laptop it was building fine, however, this morning when I run Android studio I got the error "Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to "aed79d567e57792ed352e708d2b7ca891ff897c6"" and my app structure has also altered and there is no longer a manifest folder.....image of app structure``
Below is my gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.biko.golfstroke"
minSdkVersion 8
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'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
}
Please help if you can this is so frustrating!
PLZ update your gradle plugin version in the rooter gradle file as following:
classpath 'com.android.tools.build:gradle:2.0.0-alpha6'
check the newest version of android gradle plugin in here
I think the android studio should fix this version problem by himself, it`s a bad experience for changing it manually.
I changed my class path to: classpath 'com.android.tools.build:gradle:2.0.0-alpha6'
and then followed this post:change distribution url
and it was solved....
Thanks for all the help!
Related
I'm trying to get into developing using android studio, so I recently tried to run a simple login-activity app on it. Basically, what I did was just run the setup for a new android studio project, and selected loginactivity as my default screen. I configured the emulator and hit sync gradle, but it gave me the following response:
image
I downloaded the repository that was required and tried to sync the gradle again, but it again asked exactly the same thing! Please help!
my gradle file for the app:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.fyp.fingerpay"
minSdkVersion 23
targetSdkVersion 27
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.google.android.gms:play-services:10.2.6'
compile 'com.android.support:appcompat-v7:27.+'
}
I think you have forgot to add maven repository in your app gradle file.
Try by doing these steps.
Open the build.gradle file for your application.
Make sure that the repositories section includes a maven section with the "https://maven.google.com" endpoint. For example:
allprojects {repositories {jcenter()maven {url "https://maven.google.com"}}}
Avoid using + in your dependencies as it android studio will try to update dependencies every 24 hours.
Also replace compile by implementation for low APK size.
I am experiencing a problem building my application in Android Studio. I am using Android Studio 2.2 Preview 7. When I start up my Android Studio it gives an error:
The plugin is too old, please update to a more recent version, or set
ANDROID_DAILY_OVERRIDE environment variable to xxxxxxx.
It requests I fix plugin version and sync project. I have made all the required updates but the error remains. I have read similar questions on the issue but they don't seem to apply to my case.
Could you please assist in providing me with a working solution?
Here is my build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.mobileappdev.novarttech.sunshine"
minSdkVersion 10
targetSdkVersion 23
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:23.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha4'
compile 'com.android.support:design:23.3.0'
testCompile 'junit:junit:4.12'
}
As per my observation it seems like you haven't updated Android SDK platform to version 25. First of all download and install android sdk platform and build tools from SDK Manager and use the following lines in your build.gradle(module app)
compileSdkVersion 25
buildToolsVersion "25.0.0"
Also update dependencies according to that. It should work then
As #claudio-redi says, you need to upgrade your build gradle tools.
Use build tools 2.2.2 to your root build.gradle:
classpath 'com.android.tools.build:gradle:2.2.2'
And change the gradle distribution to 2.14.1 in gradle/wrapper/gradle-wrapper.properties file with:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
Or if you already have download the gradle distribution and place it in a directory, you can set it in your Android Studio from menu File->Setting->Gradle and set it as the following image:
Please be noted when you want to use API Level 25 you need to make sure that compileSdkVersion, buildToolsVersion, targetSdkVersion, and Support Library using the same API Level 25.
I have setup android studio 2.2 and my sdk contains api 23 as well as api 24.
My build.gradle file is as below :
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.example.sanjay.myapplication"
minSdkVersion 15
targetSdkVersion 24
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'])
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha1'
testCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support:support-annotations:24.2.1'
}
I have getting below error :
Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to "9d813ee66dd60f65615706c5deaa14afed669ca5"
Fix plugin version and sync project</a><br>Open File
Please let me know, Whats going wrong here, Thank you.
When such error is shown (Plugin is too old, please update to a more recent version, Fix plugin version, and sync project), click on the Fix plugin version and sync project which appeared in the log cat. the Gradle will sync and you are good to go.
Update your Project level Build.gradle to
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
}
Download the latest gradle from https://gradle.org/gradle-download/ and
Goto: Build, Execution, Deployment ->> Build Tools ->> Gradle (Or just type in the searchbar Gradle)
Select: (X) Use local gradle distribution and set Gradle home to your extracted Gradle directory. Click on apply.
Update your Project Build.gradle to
dependencies
{
classpath 'com.android.tools.build:gradle: "latest version here" '
}
see Grade Version Compatibility for Android Studio
I am using Android studio and i want to use Marshmallow API and AppCompatActivity. When I created a new project the build.gradle contained the below lines but I receive error at R class which says not a symbol.
Please let me know how to correct the build.gradle to get the App work.
gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.com.myapplication"
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.0.1'
}
Click on Build->Clean Project and that will perform a gradle clean
Update your Android SDK Manager Install all component of Android 6.0 (API 23)
R file can be erased due to many reasons, try rebuilding your project(which is the most common issue) and other issues may include any syntax error or inappropriate file permissions in work space, the exact error report can help address the issue better.
I am trying to do an application but there seems to be some error with the gradle files now. It was working fine until I upgraded the support libraries.
I was working with api 21 which worked fine, but then i upgraded to api22 and changed the gradle files accordingly.. Now this error shows up.
Error:Failed to find: com.android.support:support-v4:22.2.0
This is my current gradle file :
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.sampleapp"
minSdkVersion 12
targetSdkVersion 22
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:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.jakewharton:butterknife:6.1.0'
}
Any help would be appreciated.
If this might help someone, after MANY trials and errors, I found that I was targeting the wrong SDK version (an older one) in the build.gradle file corresponding to "library". To change this you can do it by hand or go to the Module Settings Menu (right click on your project folder -> Open Module Settings. Then in "library" - Properties you can change the Compile Sdk and the Build Tools Versions
Using Android SDK Manager. Go to Extras and then Android Support Repository and update it to the latest version.
(This is essentially the comment #natario made, but it should be an answer.)