-
Notifications
You must be signed in to change notification settings - Fork 45
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 Override the Built-in Library #9
Comments
It really depends on the library. If it's a library used in an optional component you can do it if and only if end users don't include the component in question. Otherwise, you will always encounter an issue, specifically because the dex utility provided by the Android toolchain insists that only one instance of a class be included in the final binary (even if the two files are byte-for-byte equivalent). |
Sorry, which ones are the optional components? Where can I find the definition? By the way, what I need to replace is a class inside the lib/appinventor/core.jar . So, from its name "core.jar", it seem not to be optional at all, right? |
|
Also before recompiling, delete the "build" folder. I noticed that sometimes the information in this folder affects builds despite changes. |
I want to use a newer version of a class that its older version is provided by the built-in library, because it has a new method that the older version doesn't have. I placed the newer version of the class (in jar format) in the lib/deps/ directory, but the compiler failed to compile. The error message said there was no such method to call, so that clearly indicates the compiler is still referring to the older version.
I've found there is two ways to overcome this problem. One is deleting the older version in the lib/appinventor/ directory. Another is directly moving the newer version into the the lib/appinventor/ directory and replacing the older version.
The compilation is successful when using either way above. But when the resulting .aix file is imported and used to build an Android App, and when this app calls the method in question, the same error message appears, saying no such method.
So, the app seems still calling the older version instead of the new one, and my problem is not completely solved. I would like to know if there is a way to override the built-in library during the app building phase too?
The text was updated successfully, but these errors were encountered: