Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to execute dex: Multiple dex files define Lorg/cocos2dx/lib/Cocos2dxAccelerometer; #8555

Closed
stblue opened this issue Oct 3, 2014 · 15 comments
Assignees
Milestone

Comments

@stblue
Copy link

stblue commented Oct 3, 2014

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??

@minggo
Copy link
Contributor

minggo commented Oct 8, 2014

Did you import more than one Android project that contains org/cocos2dx/lib/Cocos2dxxxx.java?

@swastikit
Copy link

I also have same issue.
And yes I am importing two projects which uses cocos2dx v2.3.x and another one using v3.1.x.
How to fix the issue? please help.

@minggo
Copy link
Contributor

minggo commented Oct 9, 2014

It is better to remove one of them.

@swastikit
Copy link

The two projects are two game apps and we want to put both of them in 1 app.

@ijunaid
Copy link

ijunaid commented Oct 10, 2014

Same Issue :( as "swastikit" facing.

@minggo Can you please tell the better solution as we are also facing the same issue and we are using two game projects (cocos2dx projects) in one android app.

@minggo
Copy link
Contributor

minggo commented Oct 13, 2014

Hi guys,

Could you show us how to reproduce it step by step?

@minggo minggo added this to the v3.3 milestone Oct 13, 2014
@minggo
Copy link
Contributor

minggo commented Oct 13, 2014

@Dhilan007
Could you please take a look?

@minggo minggo added the accept label Oct 17, 2014
@minggo minggo removed this from the v3.3 milestone Oct 17, 2014
@minggo minggo removed the accept label Dec 25, 2014
@jooddang
Copy link

jooddang commented Jan 5, 2015

I have the same issue.. Did you fix it?

@minggo
Copy link
Contributor

minggo commented Jan 6, 2015

Did you copy cocos2d-x java codes into your project?
You should reference the project.
More detail information please refer to this document.

@jooddang
Copy link

jooddang commented Jan 7, 2015

I didn't copy it. I reference it from $(AndroidProjectDir)/../cocos2d/cocos/platform/android/java . But somehow, cocos2dx path was on project property -> Java Build Path -> Source. And, I resolved this problem by removing it.

@minggo
Copy link
Contributor

minggo commented Jan 7, 2015

@jooddang
How did you resolve it?
Modify which file?

@jooddang
Copy link

jooddang commented Jan 7, 2015

screenshot 2015 01 06 21 52 55
like this, I removed the cocos2dx path from source path..

@quanghoangminh
Copy link

thanks jooddang, it work fine for me.

@minggo minggo added this to the v3.4 final milestone Jan 8, 2015
@WenhaiLin
Copy link
Contributor

Fixed at #9897

@CarineAmiot
Copy link

Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants