goldfish07 / ResChiper

AAB Resource Obfuscation Tool for Android
Apache License 2.0
69 stars 9 forks source link

Build failed with AGP 8.4.0 #11

Open saleho27 opened 4 months ago

saleho27 commented 4 months ago

When I update my Android Studio to latest version which using AGP 8.4.0 and gradle 8.6 then it can not produce reschiper-app.aab

here is the log

`

Task :app:resChiperRelease FAILED

ResChiper Plugin Configuration:

  • ResChiper version: 0.1.0-rc4
  • BundleTool version: 1.13.2
  • AGP version: 8.0.0
  • Gradle Wrapper: 8.0

    App Build Information:

  • Project name: iLoanCalc
  • AGP version: 8.4.0
  • Running Gradle version: 8.6

FAILURE: Build failed with an exception.

This happens if I build using terminal, but if I use Android Studio build aab then it works and can produce reschiper-app.aab is it normal?

goldfish07 commented 4 months ago

have you specified signingConfigs in app/build.gradle ?

android {
.....

 signingConfigs {
        release {
            storeFile file(System.getenv("HOME") + "/keystore.jks")
            keyAlias 'keystore'
            keyPassword 'keystore'
            storePassword 'keystore'
        }
    }

}

check implementation from Reschiper-sample https://github.com/goldfish07/ResChiper-sample/blob/8a9d70da85a665fd6765dcbc962f2f62c7f2dfe1/app/build.gradle

saleho27 commented 4 months ago

Yes I have set it. If I do not use reschiper, it can be built using terminal using command bundleRelease...

In another project, AGP 8.4.0 gradle 8.6 also failed, but if AGP 8.3.2 gradle 8.4 it works...

In your sample, release using minify=false, I use minify=true for release, btw this error just happens in AGP 8.4.0 and gradle 8.6, previously it works very well... (AGP 8.3.2 dna gradle 8.4) in both project

goldfish07 commented 4 months ago

AGP 8.4.0, along with Project Gradle Wrapper 8.7, works fine for my projects. For command line builds, I use Gradle 8.7, and it doesn't matter whether minify is set to true or false.

saleho27 commented 4 months ago

What Android Studio version do you use? I use the latest, Jellyfish | 2023.3.1

goldfish07 commented 4 months ago

What Android Studio version do you use? I use the latest, Jellyfish | 2023.3.1

yes