I am using volley com.android.volley:volley:1.1.0 library to make normal requests and it is working fine. Now required is to download a pdf file too. For that I need to use volleyplus dev.dworks.libs:volleyplus:+
Now since I have added duplicate libraries it gives me error like
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
Compilation failed; see the compiler error output for details.
Also none of the volley class reference is found in the code.
So, how to achieve both the functionality?
There is nt any kind of image caching related requirements.
First of all => invalidate cache and restart if not work then
Once I was found this error. This error mean you have duplicated library but different version in your project.
Such as :
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.okhttp3:okhttp:3.y.y'
I have add "Retrofit2" and "OkHttp3" together but in "Retrofit" already included OkHttp3 with 3.x.x version but another OkHttp3 I have add is not 3.x.x but 3.y.Y version so it's different and show error
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. Compilation failed; see the compiler error output for details.
Please make sure don't have some duplicated library like this with Dependency tree
Related
In my android app's build file, I have given a wrong version of the library "com.google.firebase:firebase-core:17.0.0" for now the latest version is "com.google.firebase:firebase-core:16.0.4".
Later, I corrected the build file to use the correct version 'com.google.firebase:firebase-core:16.0.4'. Now while building the app, I am still getting the error.
Failed to resolve: com.google.firebase:firebase-core:17.0.0
I even tried to delete the dependency "com.google.firebase:firebase-core****" but still I am getting the error. Please help me to resolve.
Use same dependency for ads as used for the Core in your case (16.0.4).
Or follow this link for Further Instruction.
[https://firebase.google.com/docs/android/setup][1]
Also use implementation instead of api.
The error :
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
You are implementing the whole play-services package. Try to filter out the dependencies you want to use. For example if you need location api then only compile 'com.google.android.gms:play-services-location:11.8.0'. Try commenting out this line 'com.google.android.gms:play-services:11.6.2'.
As your .gradle file suggests, you are explicitly adding the play services in your project and you are also adding firebase DB and appcompat library which is using a different version of the play services. Try to get the version which uses the same play services version.
If you do not know how to do it you can refer to the following command
./gradlew app:dependencies
If you want an in-depth answer please refer to this awesome thread full of the information.
Following is the good article on the conflict of Gradle dependencies.
When inserting a new activity (more specifically, navigation drawer activity) my gradle sync breaks and throws the following error:
Failed to find: com.firebase:firebase-client-android:1.1.0.0
I could undo the changes, but I would like to understand why gradle breaks while adding new activities.
Looking over the IDEA LOG, I came by the following Warning:
2014-11-20 15:53:26,547 [ 788010] WARN - ea.stats.LegacySdkStatsService - AndroidSdk.SendPing failed
java.net.UnknownHostException: tools.google.com
I figure it has something to do with the Gradle build file, but I'm not entirely sure why it would compile the Firebase library before adding an activity and after, not.
I'm running on a MacBook Air, OS X Yosemite.
build.gradle: https://gist.github.com/markbratanov/82fe78f7bc2c9064986b
Idea log: https://gist.github.com/markbratanov/d38949010198ec950acd
Any help or suggestions would be appreciated, thanks.
This was solved by deleting the library from gradle dependencies, and searching for the library in Maven Central (in this case, Firebase) and adding the latest version.
I added AndEngine as a module dependency but when I try to run my project I am faced with the following error :
Gradle: Execution failed for task ':Game:compileDebug'.
Compilation failed; see the compiler error output for details.
And
Gradle: error: package org.andengine.engine.camera does not exist
Has anyone been able to successfully get their AndEngine running on Android Studio? I would greatly appreciate it if you could tell me the steps I need to take to get it running.
What I ended up doing was creating the project in eclipse and setting up andengine for the project, then importing that same project in android studio, set up the required dependencies then I been using it since no hassle.
I am having issues compiling and running my application on Android Studio.
The problem: It doesn't like that I am using deprecated APIs. (from gradlew compileDebug --stacktrace. Full stacktrace here
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
The Background:
I am using a PreferenceActivity which uses onPreferenceTreeClick and addPreferencesFromResource(int), both deprecated methods.
I am using ABS and ViewPager libraries, which both seem to also be using deprecated methods in their code.
The Question:
Can the run configurations be edited to an extend where It can compile succesfully despite of the deprecated APIs?
What can be changed/edited/modified to allow the build to compile succesfully?
Given that I plan on supporting pre-ICS devices and the usage of deprecated APIS shoudln't suppose a problem.
EDIT
So, the compiler from command prompt indicates the build was succesful, problem is running from Android Studio directly, the build process fails:
FAILURE: Build failed with an exception.
The problem seems to be something I have no idea how to fix, the popular line is:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added:
which is happening at three different places:
Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoStubImpl;
Landroid/support/v4/app/ActivityCompatHoneycomb;
Landroid/support/v4/app/LoaderManager;
Here's some more info: Full Compiler output in Android Studio
* What went wrong:
Execution failed for task ':LaPrensa:dexDebug'.
> Running C:\Users\SkullKandy\AppData\Local\Android\android-studio\sdk\build-tools\android-4.2.2\dx.bat failed.
You have simply to add this code to build.gradle (in android section)
lintOptions {
abortOnError false
}