today I upgraded my studio, and every latest sdkBuild version.
now my build.gradle(app) configuration looks like this:
android {
compileSdkVersion 23
buildToolsVersion "24.0.0 rc1"
defaultConfig {
applicationId "com.mydesign.rockstar.androidndemo"
minSdkVersion 15
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:design:23.2.0'
}
now it says a newer version of com.android.support:appcompat-v7 than 23.2.0 is available: 24.0.0-alpha1 as well as for design: 23.2.0
its not working correctly, and my app crashing. toolbar error, style error, everything is not properly working. Please help me understand what the actual problem is?
its working fine now, bcz i m just downloaded android support repository rev.28 and change both appcombat and design library to latest version. now its
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
this is latest version till now
what i learn is always use stable version of dependency. and this is what you can find it here
Related
I am following a guide on using the Recycler View, I having trouble with the part of declaring the dependency and installing the RecyclerView into Android Studio.
I added the RecyclerView to my xml file and declared the dependency in build.gradle(below)
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.ryde.chris.ryde"
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'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
compile 'com.android.supportrecyclerview-v7:23.0.0'
}
I rebuilt the app and tried installing the Recycler View repo. When installing, I ran into the same exact issue that this user did.
I took a look at the answer on that thread. I chose to use RecyclerView v 23.0.0 and made sure that I compiled with api version 23 (compileSdkVersion 23 in build.gradle). Using the AVD manager, I also made sure that my support library for api version 23 was installed and updated
Does anyone know why I am still getting this issue? Internet is working fine (this to be specific)
Change
compile 'com.android.supportrecyclerview-v7:23.0.0'
to
compile 'com.android.support:recyclerview-v7:23.0.0'
Use the new version:
compile 'com.android.support:recyclerview-v7:23.1.1'
I am unable to compile 'compile .android...' any dependicies from my last update , After some update like Android support library, android support repository , sdk platform tools in SDK manager. I am unable to add dependency, whenever i add it shows below error
And If i change my dependency compiled like this to latest As
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.1'
}
it shows like this :
So please solve my problem i m unable to work with android studio, say ur suggestions for above.
Please check if this folder exist
C:\Program Files\Android\Android Studio\gradle\m2repository\com\android\tools on your machine. If it does not, y advice is to remove Android studio and reinstall it. Note: The binary version and not the Archived version of AS
do u set compileSdkVersion 23 and buildToolsVersion "23.0.1"?
Update android SDK to latest version 23 and see that your gradle file content is similar to below
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "yur id"
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.1.0'
compile 'com.android.support:design:23.1.0'
}
I know that this question was asked here a few times, but everything i have tried from answers they gave there didn't work for me.
Also i need to mention that i have tried File - Invilidate Cache and Restart and it didn't work..
Here is my build gradle(Maybe something there is wrong):
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.dusandimitrijevic.geomondo"
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:22.2.0'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.github.manuelpeinado.fadingactionbar:fadingactionbar:3.1.2'
}
I see three issues.
Your targetSdkVersion is higher than your compileSdkVersion.
You are using a version of the support library that requires a minimum of API 22 to compile with.
You are not specifying the version of recyclerview, so it will import the latest one, which requires API 23 to compile with.
The fix is to set compileSdkVersion to 23. That SHOULD fix your missing symbols issue.
I just updated my android studio to the latest version with the new gradle version also, running my application gives me an error class android support v4 has been already added to the output don't know what is going wrong i check if there is a jar duplicated or a library duplicated couldn't find anything. here is my app:build.gradle
enter code here
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '21.1.1'
lintOptions
{
checkReleaseBuilds false
//abortOnError true
}
defaultConfig {
applicationId "package name"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes
{
release {
minifyEnabled true
proguardFile getDefaultProguardFile('proguard-android.txt')
}
}
dexOptions {
preDexLibraries = false
incremental true
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project('Libraries:UniversalImageLoader')
compile project('Libraries:facebook')
compile project('Libraries:pull-to-refresh')
compile files('Libraries/gcm.jar')
compile files('Libraries/quickblox-android-sdk-chat-2.0.jar')
compile files('Libraries/quickblox-android-sdk-core-2.0.jar')
compile files('Libraries/quickblox-android-sdk-messages-2.0.jar')
compile 'com.google.android.gms:play-services:6.1.71'
compile 'com.google.maps.android:android-maps-utils:0.3'
compile 'com.squareup.picasso:picasso:2.4.0'
compile "com.android.support:appcompat-v7:21.0.2"
}
I took of this
compile 'com.android.support:support-v4:21.0.2'
i thought its already included in the appcompat-v7 but it did not solve my issue yet
I downgraded my Android Studio version to 0.8.6 and the "Duplicate Copies" error disappear.
It isn't a perfect solution but for now and for me it is the unique solution currently.
I try to add this lib (https://github.com/daimajia/AndroidImageSlider) to my project. I added the compile library in my gradle file, but i get an error :
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion '20.0.0'
defaultConfig {
applicationId "com.pp.myapp"
minSdkVersion 16
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.2'
compile 'com.iangclifton.android:floatlabel:1.0'
compile 'com.google.android.gms:play-services:5.0.89'
compile "com.android.support:support-v4:+"
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.0.9#aar'
}
And i get this error :
Error:Module version com.android.support:support-v13:13.0.0 depends on libraries but is not a library itself
Try adding this dependency:
compile 'com.android.support:support-v13:19.0.+'
You have to install the Android Support Library from the SDK, too.
I got the same error with an oauth library. It was fixed after a while when, tired of implementing new changes to the build.gradle like changing the support libraries, I discarded the changes on the file (via Sourcetree). It synchronized and automatically got fixed.
(Android Studio) It's a kind of magic.