-
Notifications
You must be signed in to change notification settings - Fork 50
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
Dexer problem #1
Comments
Hi deckameron, I couldn't build the module without including the jar into the project, but when I do that it causes the error/conflict you encountered because the android v4 support library jar already exists in the Titanium SDK. What you have to do is to rename the file android_support-v4.jar to something like android_support-v4-disabled.jar located in the Titanium SDK in the folder below (OS X) I will update the README to include this. |
@raymondkam Thank you for reply! |
Solution is very simple, just delete 'lib/android-support-v4.jar' from the project & distribution package both. It builds perfectly & distribution package works properly with the target project. NOTE : Don't rename android_support-v4.jar at following path, because it may be used by some internal Titanium code or some other native modules. /Users/(your username)/Library/Application Support/Titanium/mobilesdk/osx/(your titanium version)/android/ |
@vatsalengg thank you for you help. Error: android.view.InflateException: Binary XML file line #1: Error inflating class com.rkam.swiperefreshlayout.MySwipeRefreshLayout I am posting my code here:
|
@deckameron You have to include following jar in your project's build path This will surely compile & work properly, I am using this method & used generated build in other project. |
@vatsalengg Thanks for figuring it out. I was suspecting that the jar included with the dist could be removed but I never had a chance to test it. I did need to include the jar within the project to build the module. Edit: How did you add the jar to the project's build path? Is project referring to the Titanium project? |
@vatsalengg I am not sure I understood what you said. |
Hi @deckameron, sorry I misunderstood. Actually you have to build the module by yourself. Follow the below given steps to build & prevent the error mentioned by you.
(android-sdk-path-here)/extras/android/m2repository/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar
Thus, after clearing all errors in project, you should build this module & place distribution package in desired target project. This method is working fine for me. @raymondkam, I could not understand the reason of conflict with android-support-v4.jar. There should be better way in Titanium to handle this duplicate jar inclusion issue. |
@raymondkam why don't you provide distributions with the android-support-v4 jar taken out? |
@FokkeZB Hey sorry I recently changed dev environments from a Mac to Windows and I couldn't get it working on my desktop. I just got my laptop setup and now I can build. I can finally address this issue and the one about setting colours dynamically. |
Raymondkam,
Thank you for sharing this module!
Unfortunately I am having problems using it. The error below is showing during compilation.
[ERROR] : Failed to run dexer:
[ERROR] :
[ERROR] : UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] : java.lang.IllegalArgumentException: already added: Landroid/support/v4/content/Loader$OnLoadCompleteListener;
[ERROR] : at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
[ERROR] : at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
[ERROR] : at com.android.dx.command.dexer.Main.processClass(Main.java:685)
[ERROR] : at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
[ERROR] : at com.android.dx.command.dexer.Main.access$600(Main.java:78)
[ERROR] : at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
[ERROR] : at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
[ERROR] : at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
[ERROR] : at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
[ERROR] : at com.android.dx.command.dexer.Main.processOne(Main.java:596)
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
[ERROR] : at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
[ERROR] : at com.android.dx.command.dexer.Main.run(Main.java:230)
[ERROR] : at com.android.dx.command.dexer.Main.main(Main.java:199)
[ERROR] : at com.android.dx.command.Main.main(Main.java:103)
[ERROR] : 1 error; aborting
[ERROR] Application Installer abnormal process termination. Process exit value was 1
The text was updated successfully, but these errors were encountered: