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

Add multidex support #4

Open
10MINT opened this issue Apr 16, 2020 · 5 comments
Open

Add multidex support #4

10MINT opened this issue Apr 16, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@10MINT
Copy link

10MINT commented Apr 16, 2020

I'm running into some issues because I need too much jar files for my extension. The error I'm getting is

[java] trouble writing output: Too many method references to fit in one dex file: 126456; max is 65536.
[java] You may try using multi-dex. If multi-dex is enabled then the list of classes for the main dex list is too large.

Somebody mentioned a solution here
https://community.appinventor.mit.edu/t/how-to-add-multidex-support-to-appinventor/257

@ewpatton
Copy link
Member

It should be easy enough to add the multidex flag to build.xml invocation of dx, but the problem is that App Inventor's build system doesn't expect that there will be more than one classes.dex in the extension. You may want to look at the dependency tree of your extension and see if all the dependencies are really necessary to do what you want. The number of methods in your extension exceeds the number of methods in all of App Inventor and its dependencies...

@ewpatton ewpatton added the enhancement New feature or request label Apr 17, 2020
@10MINT
Copy link
Author

10MINT commented Apr 17, 2020

I know that I use a lot of jar files, but that's because AI doesn't support dependency resolving. I have to resolve all dependencies and add all jar files to lib/deps. Would splitting the methods into different extension help to overcome the limit?

@ewpatton
Copy link
Member

If App Inventor resolved the dependencies, it wouldn't fix the problem of there being too many dependencies. This simply won't work unless we patch core to support extensions having more than one classes.dex file.

@pavi2410
Copy link
Member

pavi2410 commented Apr 17, 2020

I have to resolve all dependencies and add all jar files to lib/deps

@10MINT Does the dependencies here refer to those used by App Inventor itself? Doesn't AndroidRuntime.jar have them?

@10MINT
Copy link
Author

10MINT commented Apr 17, 2020

@pavi2410 I meant external dependencies. For example, the Apache POI library has a lot of dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants