DX Error when running Android Studio project - android

I am trying to set up my Android Studio project with al its dependencies. But when i try to run my project i get the following error messages:
Android Dex: [AndroidVI] Unable to execute DX
Android Dex: [AndroidVI] com.android.dx.util.DexException: Multiple dex files define Lcom/androidquery/util/Constants;
Can anybody help me with this

Check Whether You added Same jar files more than once.
If yes,Remove any one of them from libs folder and clean your project.

Check if Your Proguard is running or not.

Related

Error Exporting Vuforia Unity Project into Eclipse

I'm using the Unity's Vuforia Extension, and created a AR scene. But while exporting to Android, a pop up came and SDK outdated, but my SDK is the latest.
I clicked continue and imported the project into Eclipse.
But while trying to run the project, it doesn't launch saying the projects have errors.
I tried cleaning and running again, it shows me this in the Console tab:
[2015-02-14 10:06:34 - QCARPlayerNativeActivity] Dx
trouble writing output: already prepared
[2015-02-14 10:06:34 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/qualcomm/QCARUnityPlayer/BuildConfig;
[2015-02-14 10:06:34 - QCARPlayerNativeActivity] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/qualcomm/QCARUnityPlayer/BuildConfig;
Any ideas anyone?
In the export window, I didn't click select the scene before clicking export.
Problem solved.

export an android compound view as library

I want to export my compound view as a library for reusing. I do it as follow:
Right Click on project> Properties > Android > And check Is Library
And copy exported jar file to a new project and add it to the library, Now when I want to run my project eclipes throws an error:
[2014-10-11 11:31:18 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v7/appcompat/R$anim;
[2014-10-11 11:31:18 - khonemojaradi] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/v7/appcompat/R$anim;
According to error I know that I have same libraries that are there in my compound view and new project, But how can I fix it? I've done searches on stackoverflow and Google but I could not solve my problem
Thanks in advance
You should do two things:
Change the package route for your component because you may are having a conflict with other component of AppCompat 7
Don't copy the jar. Import your project as a Android Project. It is: in the target project, where you want to use your component, add your library project from:
Right Click on project> Properties > Android > Add project (below Check project as Library, that should be unchecked).
If you have imported your library project, it should appear there.
Good luck buddy!

Error while running project from eclipse

I have downloaded cocos2d x v3.3 beta and created a project in windows using this command
cocos.py new Tutorialv3cocos -p com.ghostdreamstudo.learning -l cpp -d D:\Development\Learning
Then i have imported project to eclipse and tried to run but eclipse gives me following error
[2014-10-03 18:40:39 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/cocos2dx/lib/Cocos2dxAccelerometer;
[2014-10-03 18:40:39 - Tutorialv3cocos] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/cocos2dx/lib/Cocos2dxAccelerometer;
Does anyone face the same problem or know how to solve this issue??
I had this problem before and was guided to remove Android dependencies from Java Build Path and it worked every time start up eclipse and do the removing for that session. As VPatidar mentioned, new Cocos2dx has some duplicate class org/cocos2dx/lib/Cocos2dxAccelerometer in two places. Remove one then that error disappears.
For any one still has this error, do one of these:
Remove libcocos2dx sources folder in Java Build Path > Source tab
or
Remove android.library.reference.1=../cocos2d/cocos/platform/android/java from project.properties file
I chose second.

Project Contains Error but not showing in source code Android

I import a pre-developed project in eclipse,in starting it shows me many errors.
After importing and including all the necessary files there are no error showing in my source code.
But whenever i tried to run the application it alert me that " There is error in my project".
But no errors are showing inside my project.
How can i fix my problem ?
This is what showing in my console in red color.
[2014-02-12 16:05:53 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/readystatesoftware/sqliteasset/SQLiteAssetException; [2014-02-12 16:05:53 - AClickCell_Orion] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/readystatesoftware/sqliteasset/SQLiteAssetException;
Go to lib folder and remove or delete android-support-v4 jar file. And clean and run. It will work.
Go to Project Properties > Java Build Path and under Add Libraries Tab, remove Android Dependencies. Then right click on project, go to Android Tools and click Add supported Libraries. See if that helps
Your project has two copies of the sqliteasset helper library. Remove one of them.

Android: Dex conversion failed while importing

I got an error while i import an android project from one workspace location to another in eclipse.
I'm using Google_admob in my project to display ads..I does't have any errors and it works well in my old workspace.
Eclipse Version : Indigo Service Release 2
Android-Project Version : Android 4.0.3
Error states :
[2012-12-03 12:02:27 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/google/ads/Ad;
Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/google/ads/Ad;
i found my problem.
I actually import my lib jar file in libs_folder and also in project_libraries(External Jar)..So 2 times dex file has created in bin/dexedLibs/ ..Now i deleted one jar file from one location ..
now its working
Thanks for your support geeks..
My problem was resolved after cleaning up some directories and files left over from the previous versions of the tools. ADT Rev 14 changes where binaries are stored. I deleted the entire bin directory, restarted Eclipse and cleaned the build and forced a rebuild. That seemed to do the trick initially but the problem came back after the next run.
I finally discovered that my bin directory was included in the project build path. I excluded bin from the build path and repeated the steps above. This resolved my problem.

Categories

Resources