goldfish07 / ResChiper

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

Error during Release packaging, cannot use 'ApplicationVariant.getSigningConfig()' #8

Open xiaojiangclassmate opened 6 months ago

xiaojiangclassmate commented 6 months ago

./gradlew clean :app:resChiperRelease --stacktrace error:

Execution failed for task ':app:resChiperRelease'.
> Cannot invoke "com.android.builder.model.SigningConfig.getStoreFile()" because the return value of "com.android.build.gradle.api.ApplicationVariant.getSigningConfig()" is null
goldfish07 commented 6 months ago

have you declared signingConfigs in app/build.gradle ?

  android {
  signingConfigs {
        release {
            storeFile file("path_to_keystore.jks")
            keyAlias 'alias***'
            keyPassword 'ayus***'
            storePassword '***'
        }
    }

   buildTypes {
      release {
            signingConfig signingConfigs.release
        }
    }
 }
xiaojiangclassmate commented 6 months ago

I declared it, but the signature information is stored in the configuration file and read using Properties.

goldfish07 commented 6 months ago

check this sample https://github.com/goldfish07/ResChiper-sample