android plugin issue, asks to update, but already updated all - android

I know this has been asked before as well, but I have done all I can.
I have updated all I can from SDK manager, but still I am getting this issue with my project that I just created.
There is no functionality I have given yet, but the issue says the plugin is too old, please update or change the ANDROID_DAILY_ENVIRONMENT variable.
This is my gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.manav.loginapp"
minSdkVersion 21
targetSdkVersion 24
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:24.2.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha1'
}

Related

Unable to sync gradle

I get error messages when I try to add recyclerview and cardview dependencies to my build.gradle. Here is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.truewebdev.applytheme"
minSdkVersion 17
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.2.0'
compile 'com.android.support.recyclerview-v7:23.2.0'
compile 'com.android.support.cardview-v7:23.2.0'
}
Here are the error messages:
If I try to install repository, I get the following:
What is wrong here?
Did you download the Android Support Repository from the SDK Manager?
From android docs:
Make sure you have downloaded the Android Support Repository using the SDK Manager.
http://developer.android.com/tools/support-library/setup.html#libs-with-res

Rendering Problems: The following classes could not be instantiated. Answers to other questions haven't helped.

I'm currently doing an Android Developer Tutorial using Android Studio 1.5.1 and when trying to view my code in content_main.xml
I encounter the following message:
Rendering Problems
Here is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "cashcow.sunshine.app"
minSdkVersion 10
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'
compile 'com.android.support:design:23.1.1'
}
I've seen similar questions but I haven't found a clear answer that applies to the error I have encountered.

android Studio gradle error hash string 21

apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "de.ts.prosper"
minSdkVersion 11
targetSdkVersion 21
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:21.0.3'
}
Hi :)
Android Studio put this error message -
failed to find target with hash-string android-21
What is wrong? SDK 21 is installed in SDK and 23 also
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "de.tetzisoft.prosper"
minSdkVersion 11
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.0.1'
}
Now it Looks like this and it doesn't work - ???
Failed to sync gradle Project ???
Your compile version should be the same as buildToolsVersion "23.0.1".
Please change it to 23.
Also in dependencies set compile 'com.android.support:appcompat-v7:23.1.1'
I've just run your code and it works. You should maybe clean and rebuild the project.

Android Studio telling me it cannot resolve symbols?

Android Studio was telling me it couldn't resolve some symbols in my code. After research, it was apparent that my project was API level 23, which wasnt compatible with some of the code. I decided to change it to API level 21.
Below is the previous code in my build.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.scriptdesigninc.test_app"
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'])
compile 'com.android.support:appcompat-v7:23.0.1'
}
I was told that I have to change it to the following,
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.scriptdesigninc.test_app"
minSdkVersion 14
targetSdkVersion 21
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'
}
After I changed it, it told me I am missing the API package and that I have to download it, which I did. Then I clicked "retry" and it said it was unable to sync gradle project.
Please help, thank you in advance.
dependencies {
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
}
Add the above dependency in your build.gradle file.
This is happening because Android M does not supports the Apache HTTP API

android.support.v7.internal.widget.ActionBarOverlayLayout could not be Found

I followed the all of related question for this error and i tried :
1.changing the theme of the preview activity
//but I dont need this. It just changes the preview action bar (or other something) and I dont need this. (material personal app_theme)
2.change to API-21.
//This also fixes this error but we cannot see any action bar anymore with this option.
So, my Android Studio Version is:
1.2.1.1
I'm using API-22.
Build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
defaultConfig {
applicationId "test.myapplication"
minSdkVersion 15
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.0.0'
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
defaultConfig {
applicationId "test.myapplication"
minSdkVersion 15
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.0.0'
}
How to fix this?
After update the Android Studio to AI 141.1962279 From Canary Channel and i added this one on the Build.gradle and it's seems work now.
compile 'com.android.support:support-v4:22.1.1'

Categories

Resources