My main project and my dependant project are in the same root directory
like
My root directory : AndroidProjects:
Android-nRF-Toolbox-master
Android-DFU-Library-release
The error reported :
Error:(24) A problem occurred evaluating project ':app'.
Project with path '..:DFULibrary:dfu' could not be found in project ':app'.
My build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile project(':..:DFULibrary:dfu')
compile files('libs/achartengine-1.1.0.jar')
compile files('libs/nrf-logger-v2.0.jar')
}
settings.gradle
include ':app', '..:DFULibrary:dfu'
Please tell me what I am missing here.
Change compile project(':..:DFULibrary:dfu')
to compile project(':DFULibrary:dfu').
Related
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 doing Firebase Auth Application in Android and i geting in trubble(stuck).I got this error Error:Execution failed for task ':app:processDebugGoogleServices'
I added these dependancies in gradle.build in(Module:app)
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
// compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.google.android.gms:play-services-auth:10.2.0'
}
apply plugin: 'com.google.gms.google-services'
I also Added classpath in gradle.build project
classpath 'com.google.gms:google-services:3.0.0'
Added google-services.json file in android Project
I also Checked
1)AndroidManifests file package name,
2)In gradle.app applicationId and
3) In google-services.json package_name.
Everywhere name are Same.
I don't know where actually getting problem
Okey, I got Answer for this question....
Sorry i forgot place api_key
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
im a begginer in android studio and im trying to perform a database sync with mysql and a android database. after following a guide (it makes no mention to gradle stuff however so im having to improvise) im left with the bellow error
After searching i was told its probably my dependencies but i haven't had much look so far
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile files('libs/gson-2.2.2.jar')
compile files('libs/android-support-v4.jar')
compile files('libs/android-async-http-1.4.4.jar')
}
my library in the .idea folder look like this
libraries
android_async_http_1_4_4.xml
android_support_v4.xml
appcompat_v7_21_0_3.xml
gson_2_2_2.xml
support_annotations_21_0_3.xml
support_v4_21_0_3.xml
this is the error i got
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Applications/Android Developer Tools/sdk/build-tools/21.1.2/dx --dex --no-optimize --output /Volumes/Untitled/You copy/app/build/intermediates/dex/debug --input-list=/Volumes/Untitled/You copy/app/build/intermediates/tmp/dex/debug/inputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompatIcs;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
thank you for any help you can offer me
Gradle knows how to resolve dependency conflicts. You can read about that here : https://gradle.org/docs/current/userguide/dependency_management.html .
So the error is not because appcompat clashes with support-v4.
It looks like you're referencing twice, libraries from your libs folder.
Either use:
dependencies {
compile 'com.android.support:appcompat-v7:21.0.3'
compile files('libs/gson-2.2.2.jar')
compile files('libs/android-support-v4.jar')
compile files('libs/android-async-http-1.4.4.jar') }
or:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
}
However, my recommendation is to also reference support-v4, gson and android-async as you reference appcompat-v7.
Problem:
With Gradle dependencies, AppCompatv7 also brings in Supportv4. So, simply remove Supportv4 .jar because you are accidentally adding it twice.
Your dependencies:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile files('libs/gson-2.2.2.jar')
compile files('libs/android-support-v4.jar') // <-- remove jar
compile files('libs/android-async-http-1.4.4.jar')
}
Should be:
I also upgraded your .jars into Gradle dependencies.
dependencies {
compile 'com.android.support:appcompat-v7:22.0.0' // <-- upgraded
compile 'com.google.code.gson:gson:2.3.1' // <-- upgraded to gradle dependency
compile 'com.loopj.android:android-async-http:1.4.4' // <-- upgraded to gradle dependency
}
I read Sweet AlertDialog tutorial and I have added dependencies to my project this way:
select Build.Gradle (Module:app) and open
go to this line:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
and change to:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'cn.pedant.sweetalert:library:1.3'
}
Run the my app.but i get this error:
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.android.support:appcompat-v7:21.0.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/appcompat-v7/21.0.0/appcompat-v7-21.0.0.pom
https://jcenter.bintray.com/com/android/support/appcompat-v7/21.0.0/appcompat-v7-21.0.0.jar
file:/D:/sdk/ADT-Bundle-Windows-x86-20140702.Full_p30download.com/sdk/extras/android/m2repository/com/android/support/appcompat-v7/21.0.0/appcompat-v7-21.0.0.pom
file:/D:/sdk/ADT-Bundle-Windows-x86-20140702.Full_p30download.com/sdk/extras/android/m2repository/com/android/support/appcompat-v7/21.0.0/appcompat-v7-21.0.0.jar
file:/D:/sdk/ADT-Bundle-Windows-x86-20140702.Full_p30download.com/sdk/extras/google/m2repository/com/android/support/appcompat-v7/21.0.0/appcompat-v7-21.0.0.pom
file:/D:/sdk/ADT-Bundle-Windows-x86-20140702.Full_p30download.com/sdk/extras/google/m2repository/com/android/support/appcompat-v7/21.0.0/appcompat-v7-21.0.0.jar
Required by:
MyApplication:app:unspecified > cn.pedant.sweetalert:library:1.3 > com.pnikosis:materialish-progress:1.0
And when i add appcompat-v7-21.0.0.jar i get this error:
Error:Failed to find: com.android.support:appcompat-v7:21.0.0
Open File<br>Open in Project Structure dialog
Remove appcompat-v7-21.0.0.jar first, then try replace your dependencies with the following:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'cn.pedant.sweetalert:library:1.3'
}
If its a case of missing support library, I think you need to download Android Support Repository from the
Android SDK Manager->SDK Tools->Support Repository->Android Support Repository.