mmin18 / Dex65536

Solve the issue with dalvik compiler limitation on 65536 methods (Unable to execute dex: method ID not in [0, 0xffff]: 65536)
MIT License
351 stars 121 forks source link

What if Lib is the one who has more than 65,536 methods? #12

Open nyahahawakoko opened 9 years ago

nyahahawakoko commented 9 years ago

What to change if the situation is:

mmin18 commented 9 years ago

if you can seperate the jar into several jar package, i think you can modify the custom_build.xml and classloader dependency and build a apk whick contains several dex classes. but i'm not sure it can run on devices. On Sep 23, 2014 6:00 PM, "Nyahaha Wakoko" notifications@github.com wrote:

What to change if the situation is:

  • Dex65536 has less than 65,536 methods
  • Lib has more than 65,536 methods
  • Lib includes other different libraries

— Reply to this email directly or view it on GitHub https://github.com/mmin18/Dex65536/issues/12.

nyahahawakoko commented 9 years ago

I've been working on it recently and achieved this:

I have tested it with my app, and it worked, its drawback is the application start time after the first install, in my app it took about +-6 seconds, but the next several times I opened the app, it would took about less than a second.

Beyond these, I still do not know what are the other drawbacks.

rambabupudari commented 9 years ago

hi nyahahawakoko ,

Thanx for your great answer.i have solved my issue followed by your custom rule process. But i have another issue which is my jar contain text files.that text files not loaded when i am applying your custom rules. is there any other way to add text files from inside jar. i have check with fileset but i didnt get how add if text file have inside jar file.

I have attached the screenshots for reference. please help me , Thanx in advance dexissue dexissue1

rambabupudari commented 9 years ago

Can u please try to build the build the sample project with add aws-android-sdk-2.1.0-s3.jar and aws-android-sdk-2.1.0-core.jar. basically these jars are using for upload the file to server.

nyahahawakoko commented 9 years ago

I'm sorry but I have not encountered this issue yet, since my investigation was being paused. As to my last issue before I paused, the files/projects that are dependent from other project should be in one lib-*.apk. Try to put aws-android-sdk-2.1.0-s3.jar and android-sdk-2.1.0-core.jar in one lib-*.apk.

rambabupudari commented 9 years ago

Ya i do the same but when i upload the image to server this error should occure. please refere this link to how to upload image to server https://aws.amazon.com/articles/3002109349624271.