skylot / jadx

Dex to Java decompiler
Apache License 2.0
41.82k stars 4.89k forks source link

Export gradle for AAR files #2044

Open Bourne-Koloh opened 12 months ago

Bourne-Koloh commented 12 months ago

Issue details

Click "File" > "Save as Gradle Project" > "Choose Folder" > "Save"

Relevant log output or stacktrace

Jadx version : 1.4.7.253-2d28da9b
Java version : 17.0.9
Java VM      : Oracle Corporation Java HotSpot(TM) 64-Bit Server VM
Platform     : Windows 11 (10.0 amd64)
Max heap size: 12704 MB

java.lang.IllegalStateException
    at java.base/java.util.Optional.orElseThrow(Unknown Source)
    at jadx.core.export.ExportGradleTask.run(ExportGradleTask.java:47)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)

Provide sample and class/method full name

No response

Jadx version

1.4.7.253-2d28da9b

skylot commented 12 months ago

@Bourne-Koloh looks like resources file (.arsc) not found, can you share apk file you are using? https://github.com/skylot/jadx/blob/2d28da9b0e2b704a77946dcd5ef409d46944e2b2/jadx-core/src/main/java/jadx/core/export/ExportGradleTask.java#L44-L47

Related to #1918

BourneKoloh commented 12 months ago

lib.aar.zip

skylot commented 12 months ago

lib.aar.zip

Oh, thanks! I always forget about AAR files :slightly_frowning_face: