When compiling with latest Android Studio 3.0 (gradle 4.1) I get
Unable to resolve dependency for ':app#fullReleasenoproguard/compileClasspath': Could not resolve project :aFileChooser.
I fixed it changing in build.gradle from
dependencies {
compile project(':aFileChooser')
}
to
dependencies {
implementation project(path: ':aFileChooser', configuration: 'default')
}
Related
I've an Android app in Android Studio. I'm using Gradle Version = 4.6, Android Tools Plugin Version=3.2.1. It has a app module (main) and a library module. And I hope all buildTypes depend on the same configuration.
my build.gradle(app):
dependencies {
api project(path: ':lib', configuration: 'custom')
}
But it is ERROR:
Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve project :lib.
Try to replace your code like below
implementation project('path: ':lib', configuration: 'custom'')
Error:(27, 13) Failed to resolve: org.quanqi:android-view-pager-indicator:0.9.0
.....
Error:(29, 13) Failed to resolve: com.astuetz:pagerslidingtabstrip:1.0.1
....
Error:(28, 13) Failed to resolve: com.sothree.slidinguppanel:library:3.1.1
....
My gradle dependencies are
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
//testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'org.quanqi:android-view-pager-indicator:0.9.0'
compile 'com.sothree.slidinguppanel:library:3.1.1'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
}
my proxy is set in gradle.properties...(credentials not shown)
systemProp.http.proxyPassword=xxxxxx
systemProp.http.proxyHost=x.x.x.x
systemProp.http.proxyUser=xx#x.com
systemProp.http.proxyPort=8080
Still gradle build is failing... when I am building the project outside firewall its working perfect, no proxy required then. I am using Android Studio 1.4
I have already tried the following and was not successful:-
Using ViewPagerIndicator library with Android Studio and Gradle
Use HTTP as default in IntelliJ or Android Studio
I have already configured proxy settings for Andriod Studio and SDK.
This three r library projects and it is added as
in build.gradle import library module as
compile project(':library_projectname')
The add this line in settings.gradle
include ':app', ':library_projectname'
I applied following library dependencies,In my android studio take only com.android.support:appcompat-v7:21.0.+ like that and all google dependencies.If i apply private library dependencies like following
Failed to find:it.neokree:MaterialTabs:0.11![Failed to find library dependencies in build.gradle android studio][1]
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.+'
compile 'com.android.support:recyclerview-v7:21.0.+'
compile 'org.lucasr.dspec:dspec:0.1.1'
compile 'it.neokree:MaterialTabs:0.11'
compile 'com.mcxiaoke.volley:library:1.0.+'
compile 'com.telly:mrvector:0.2.0'
compile 'com.oguzdev:CircularFloatingActionMenu:1.0.2'
compile 'me.tatarka.support:jobscheduler:0.1.1'
compile 'jp.wasabeef:recyclerview-animators:1.1.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1#aar'
compile 'com.daimajia.androidanimations:library:1.1.3#aar'
compile 'com.pkmmte.view:circularimageview:1.1'
compile 'com.android.support:gridlayout-v7:22.0.0'
}
Failed to find library dependencies in build.gradle android studio.
I researched so many times and tried so many ways.but i can't find solutions.i don't know this is a studio gradle problems or my company blocked some firewalls certificate for security.I want to solutions urgent.please somebody solve this problem and help for me.currently i have used jar files only.If i used jar files through libs folder then what is diffrent between eclipse and android studio/
Try sync gradle again and check if you can link to this page:
https://jcenter.bintray.com/it/neokree/MaterialTabs/maven-metadata.xml
If you can't, if might be the firewall problem.
And some dependencies might out of date.
I help you to sync the latest version using andle
com.android.support:appcompat-v7: 21.0.+ -> 23.1.0
com.android.support:recyclerview-v7: 21.0.+ -> 23.1.0
com.mcxiaoke.volley:library: 1.0.+ -> 1.0.19
jp.wasabeef:recyclerview-animators: 1.1.0 -> 2.0.1
com.daimajia.easing:library: 1.0.1 -> 1.0.2
com.android.support:gridlayout-v7: 22.0.0 -> 23.1.0
I'm trying to setup nhaarman/ListViewAnimations inside of Android Studio 1.1.0.
From Setup:
Add the following to your build.gradle:
repositories {
mavenCentral()
}
dependencies {
compile 'com.nhaarman.listviewanimations:lib-core:3.1.0#aar'
compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0#aar'
compile 'com.nhaarman.listviewanimations:lib-core-slh:3.1.0#aar'
}
yet Android Studio says:
Gradle project sync failed. Basic functionality (e.g. editing,
debugging) will not work properly.
Error:(26, 0) Gradle DSL method not found: 'compile()'
Possible causes:<ul><li>The project 'X' may be using a version of Gradle that does not contain the method.
Gradle settings</li><li>The build file may be missing a Gradle plugin.
Apply Gradle plugin</li>
You are adding these dependencies in the top level build.gradle file.
You have to add these lines in the module build.gradle file.
root
build.gradle //top level
app
build.gradle //module level
After adding those lines to:
build.gradle (Module: app)
instead of
build.gradle (Project: app)
the error is gone.
Try this:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.nhaarman.listviewanimations:lib-core:3.1.0'
compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0'
}
Try removing #arr. worked for me.
//ListView Animations
compile 'com.nhaarman.listviewanimations:lib-core:3.1.0'
compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0'
I am trying to use a Library from a Module, but built that library in specified Flavor.
dependencies {
compile project(':library_module_1')
compile project(':library_module_2', configuration: 'flavor_1')
}
What am I doing wrong?