Error while compiling app with module in place
developer82 opened this issue · 8 comments
When compiling the app with the module in place it fails with the following error:
[ERROR] Failed to run dexer:
[ERROR]
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/media/ExifInterface;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/media/ExifInterface$1;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/media/ExifInterface$ByteOrderedDataInputStream;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/media/ExifInterface$ByteOrderedDataOutputStream;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/media/ExifInterface$ExifAttribute;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/media/ExifInterface$ExifTag;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/media/ExifInterface$IfdType;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/media/ExifInterface$Rational;
[ERROR] 8 errors; aborting
Build failed. Process exited with code 1.
I get the same error!
@linron can you provide some more details like which module it's crashing with and the Android OS version along with Ti SDK version you used at the time of this error?
The module fails with SDK 7.4.0.
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:versionCode="8">
<application android:theme="@style/appcelerator"/>
<uses-sdk android:targetSdkVersion="26"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera"/>
</manifest>
</android>
<property name="ti.android.threadstacksize" type="int">131072</property>
<property name="ti.android.httpclient.maxbuffersize" type="int">131072</property>
<modules>
<module platform="android">ti.barcode</module>
<module platform="iphone">ti.barcode</module>
<module platform="commonjs">ti.cloud</module>
<module platform="android">in.prashant.imagecrop</module>
<module platform="iphone">ti.imagefactory</module>
<module platform="android">ti.imagefactory</module>
</modules>
Seems it's failing due to ti.imagefactory module which might be using the different ExifInterface lib. Can you try by removing ti.imagefactory and then ti.barcode to actually know which module is conflicting with image-cropper?
I have tried to remove all other modules and still get an error when packaging for android.
This module is using the ExifInterface library which was actually missing at the time of this module creation in SDK 7.1.1.GA. But titanium sdk 7.4.0 has a different version of this lib and I will need to recompile my module using that library. You will have to either wait till I update it by end of this week or you can grab the source code and do a recompile with the SDK exifinterface.jar lib.
Thx for the quick reply - I will wait fro the update!
Issue has been resolved by removing classes.jar file from lib folder as it was already being included by Titanium SDK 7.4.0.
Please find the fixed module version 3.0.0 here : https://github.com/prashantsaini1/android-titanium-imagecropper/blob/master/android/dist/in.prashant.imagecrop-android-3.0.0.zip