I want to use ConcurrentLinkedQueue in an android application, have written the code, but now I'm getting an error when the project builds:
Conversion to Dalvik format failed with error 2
I'm using Eclipse with the lastest version of the ADT plugin.
Any ideas how I can fix this problem?
You have a classpath problem. You shouldn't have to compile it. It's provided in Android API.
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.
Im Using Android Studio 3.0.1, the project uses SDK Version 26. I try to pull messages from Google Cloud PubSub Module using the library 'grpc-pubsub-v1' adding in the app build.gradle the line:
compile ('com.google.api.grpc:grpc-pubsub-v1:0.0.2')
When the gradle sync the next error appear:
Error:Execution failed for task':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Maybe the version of the library is not compatible with the version of SDK, Gradle or other thing, also, adding the line 'multiDexEnabled true' dont fix the problem, the gradle version is 3.0.1.
Which is the correct library to use, or how to find it?
As you are using gradle version is 3.0.1, you need to change compile to implementation as shown in this gradle document. It is a change that was done on the version 3.0.
I am trying to import an android ocr project from Eclipse(juno) to Android Studio. However faces the following error.
Error:Execution failed for task ':eyestwo:compileReleaseNdk'.
Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin. For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental. Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration.
I have tried searching for solution for this problem and found several solutions from this links:
After updating Android Studio to version 1.3.0 I am getting "NDK integration is deprecated in the current plugin" Error
NDK Integration in Android Studio Error
However, both methods did not work for me as the 2nd method leads to the error:
"Gradle DSL method not found:'sourceSets()'"
The 1st method leads to the error as shown below when I try to run the application:
The source code I used is from here: https://github.com/TheWall89/AndrOCR
Follow this guide and u'll get the correct result... I have done this before..
Tess Two guide for android studio
My project source code
Im trying to get sinch going, and I am following their tutorial form here.
https://www.sinch.com/tutorials/android-messaging-tutorial-using-sinch-and-parse/
step one is download the skelton and do the gradle build, however first error was unsporrted version of gradle. android studio fixed it automatically and re-imported. and then i get this error:
Error:(15, 0) Gradle DSL method not found: 'runProguard()'
Possible causes:The project 'messenger' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper fileThe build file may be missing a Gradle plugin.
Apply Gradle plugin
I'm new to android programming and android studio, so I'm kinda lost. How can i get this built and continue with the tutorial?
To comply with the newer versions of Gradle, change 'runProguard' to 'minifyEnabled'
in my case, i am using sinch 3.11.1.
it is aar file.
so you need to import aar file.
after that you can use sinch on your project.
to import aar file you can follow this video (it is not mine):
https://www.youtube.com/watch?v=J-GbMTa1fX0
hope it helps.
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.