Why gradle trys to download dependencies again, when it downloaded them in past?
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.androied.support:appcompat-v7:23.0.1'
//compile 'com.nineoldandroids:library:2.4.0'
compile 'com.android.support:cardview-v7:23.0.1'
compile project(':sweetsheet')
compile files('libs/bolts-tasks-1.3.0.jar')
}
the error:
Error:(30, 13) Failed to resolve: com.androied.support:appcompat-v7:23.0.1
Show in File<br>Show in Project Structure dialog
I'm not online all the time. I downloaded the appcompat-v7:
screenshot of downloaded appcompat-v7
You have a typo.
com.androi e d.support:appcompat-v7:23.0.1 instead of
com.android.support:appcompat-v7:23.0.1
You can change gradle settings in the android studio
Go to settings and type gradle then you can tick gradle offline work and the gradle is not going download dependencies every time.
Related
I am working on geofencing app in Android. If I set the
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-location:9.0.1'
}
it works fine.If I changed it to
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-location:11.0.2'
}
I get following error.
package com.google.android.gms.maps does not exist
package com.google.android.gms.maps.model does not exist
Why? I need to set it to 11.0.2 for integrating it with other app.
Sync Project With Gradle File may help. Just click the button next to AVD Manager or navigate through Tools->Android->Sync Project With Gradle File.
Try to sync your project with gradle file but if gradle sync failed then download the latest version of gradle and specify its path under build.gradle and try to sync again.
you got to install the missing google play services.
Go to settings and update your google play services and google repository to latest version which is 46 means you got to use this version 11.0.46
I'm trying to use a Navigation Drawer, but I can't because I get the error:
Error:A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find any version that matches com.android.support:design:21.+.
Versions that do not match:
26.0.0-alpha1
25.3.1
25.3.0
25.2.0
25.1.1
+ 21 more
Required by:
project :app
On gradle I have:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v4:21.0.3'
compile 'com.android.support:design:21.+'
}
Can you please help me?
Try using this:
compile 'com.android.support:design:21.0.3'
Or:
compile 'com.android.support:appcompat-v7:21.+'
compile 'com.android.support:support-v4:21.+'
compile 'com.android.support:design:21.+'
I am porting an android application project built with non-eclipse tool, with gradle in use, perhaps the tool was Android Studio. I have the .zip file of the project. So, far I have put all layout,values and drawables in place. I am stuck at the last step of dependencies.
The project depends on Github : BlueJamesBond library and many others. This is the build.gradle dependencies
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:support-v4:+"
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5#aar'
compile 'com.github.bluejamesbond:textjustify-android:2.1.6'
}
Now, the BlueJamesBond itself is using gradle and I have no idea how gradle works. I was expecting some jar of the library which I could have added in Build Path. Can anyone please suggest how to resolve the dependency in my project?
I have a problem when trying to compile exoplayer r1.5.2 repository.... There's no issue when I use com.google.android.exoplayer:exoplayer:r1.4.2 instead.
Here's of the compilation code:
And then this error is thrown:
I had this issue as well: I added compile 'com.google.android.exoplayer:exoplayer:r1.5.2' to my app/build.gradle:
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'
compile 'com.google.android.exoplayer:exoplayer:r1.5.2'
}
And tried sync project in Android Studio, but got the error above.
Solution
I got the dependency downloaded by upgrading to gradle 2.6 and invoking gradle from the shell:
$ ./gradlew build
Upgrading Gradle
Edit the distributionUrl line in <project dir>/gradle/wrapper/gradle-wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-all.zip
I am trying to sync Gradle with the following dependencies
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.google.android.gms:play-services:7.0.0' }
but its giving following error
after clicking on the link provided in the screenshot it opens and say the following
I'm not able to solve this problem.
My Android Repo and all support library is updated.
TIA