[TIMOB-23906] Hyperloop: Android - UNEXPECTED TOP-LEVEL EXCEPTION: No such file or directory because relative path includes absolute prefix when jar or aar includes additional jar or aar in libs folder
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-08-20T17:04:26.000+0000 |
Affected Version/s | Release 5.5.0 |
Fix Version/s | n/a |
Components | Android, Hyperloop |
Labels | aar, cli, hyperloop, ti |
Reporter | Jerod Fritz |
Assignee | Unknown |
Created | 2016-09-15T03:07:46.000+0000 |
Updated | 2019-08-20T17:04:26.000+0000 |
Description
In my project I include intercom-sdk-base-3.0.8.aar inside of /app/platform/android
Inside the archive is that additional dependency jar at libs/repackaged_dependencies.jar
The generated path to include this jar is incorrect causing the following error to be generated:
[ERROR] Failed to run dexer:
[ERROR]
[ERROR] UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] java.io.FileNotFoundException: /Users/jerodfritz/Documents/Appcelerator_Studio_Workspace/Prspctr/build/hyperloop/android/intercom-sdk-base-3.0.8/classes.jar,/Users/jerodfritz/Documents/Appcelerator_Studio_Workspace/Prspctr/build/hyperloop/android/intercom-sdk-base-3.0.8/libs/repackaged_dependencies.jar (No such file or directory)
[ERROR] at java.util.zip.ZipFile.open(Native Method)
[ERROR] at java.util.zip.ZipFile.(ZipFile.java:215)
[ERROR] at java.util.zip.ZipFile.(ZipFile.java:145)
[ERROR] at java.util.zip.ZipFile.(ZipFile.java:159)
[ERROR] at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
[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:672)
[ERROR] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
[ERROR] at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
[ERROR] at com.android.dx.command.dexer.Main.run(Main.java:277)
[ERROR] at com.android.dx.command.dexer.Main.main(Main.java:245)
[ERROR] at com.android.dx.command.Main.main(Main.java:106)
[ERROR] 1 error; aborting
Workaround is to unarchive the aar. Move any archives in libs to /app/platform/android/ and recreate the .aar using jar without the libs included.