Closed ffdsss closed 1 year ago
i need the full build log. use ./gradlew command line to build and capture.
at least run with build with --scan and post the link. could not initialize means an exception in the static initializer was thrown. there is a root cause exception that i cant see there.
at least run with build with --scan and post the link. could not initialize means an exception in the static initializer was thrown. there is a root cause exception that i cant see there.
This error will be reported when the AGP version is 4.2.0+. I lower the AGP version to 4.0.1 and this error will not be reported. But there will be the problem of Android resource linking failed
This is an error from AGP 4.0.1
´AAPT: unknown option '--no-proguard-location-reference'.´
from https://github.com/DexPatcher/dexpatcher-gradle/releases:
Apktool is running late on updates, and the AAPT2 binaries shipped with latest Apktool (v2.4.1) are not compatible with the Android Gradle plugin v3.6. Until the Apktool project updates their AAPT2 binaries, builds will fail if useAapt2BundledWithApktool
is enabled and it will not be possible to patch apps having invalid resources.
Note that incompatibilities mostly stem from new ProGuard options in AAPT2 which are emitted even if ProGuard processing is disabled. An adapter script that filters out these options could be used to make the newer plugins work with older versions of AAPT2. The script would be configured as the AAPT2 executable using the existing DexPatcher-gradle infrastructure for AAPT2 executable selection.
Also note that Android seems to be moving towards a pure JVM build ecosystem, which would entail phasing out AAPT2. This can be seen in the code of the Android Gradle plugin v4.0. How this change will impact the processing of apps with invalid resources cannot be predicted at this time.
i dont know the versions of the software you are using because you dont publish your project.
i need to know versions of:
note that release notes for each dxp-gradle version gives you compatible version ranges for AGP and gradle. also the samples for each dxp-gradle linked from their release notes show examples of configurations that work.
also note that the latest released dxp-gradle is: https://github.com/DexPatcher/dexpatcher-gradle/releases/tag/v2.0.0
newers are pre-releases as shown in release notes.
also check latest published version here: https://plugins.gradle.org/search?term=dexpatcher
as stated in v2.0.0 release notes you should be using:
you are using AGP 4, so nothing will work. you have to read the docs!
also note that the latest released dxp-gradle is: https://github.com/DexPatcher/dexpatcher-gradle/releases/tag/v2.0.0
newers are pre-releases as shown in release notes.
also check latest published version here: https://plugins.gradle.org/search?term=dexpatcher
as stated in v2.0.0 release notes you should be using:
- Android Gradle plugin v3.4.2. Note: Android Gradle plugin imposes Gradle version limitations.
- Gradle v5.1.1 (though v5.1.1 through v5.6.4 should work).
you are using AGP 4, so nothing will work. you have to read the docs!
Thank you very much, I changed the version as you asked. After rebuilding, it prompts "AAPT: error: duplicate value for resource 'attr/navigationMode' with config"
i recommend you use dxp-tool v1.8.0-beta1.
why are you using apktool 2.4? 2.7.0 is the current version.
i can't help you because you are not publishing the complete project. but it seems your project wants to add a value for 'attr/navigationMode'? or maybe apktool is too old? i don't know, i dont have the project.
i recommend you use dxp-tool v1.8.0-beta1.
why are you using apktool 2.4? 2.7.0 is the current version.
i can't help you because you are not publishing the complete project. but it seems your project wants to add a value for 'attr/navigationMode'? or maybe apktool is too old? i don't know, i dont have the project.
The version used in your sample project is apktool 2.4, so I also used this one. I have uploaded my local code, and this is the link: https://github.com/ffdsss/patcher-test
It has been solved, thank you
ok, sorry i didn't have time to look at it yet, but im glad you could solve it by yourself :+1: :+1: