Closed kiber-io closed 1 year ago
Namespace prefix is corrected according to last suffix of package name where attribute is referred . Such distinctive naming is vital when dealing with multi package resources.
Check your package name on manifest should end with .ru
, APKEditor has no problem. you can check for consistency by running decompile
> compile
> decompile
...
@REAndroid But the application stops working after decompilation - compilation :) Crashes with an error:
FATAL EXCEPTION: main
Process: com.wildberries.ru, PID: 10378
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wildberries.ru/ru.wildberries.SplashActivity}: android.view.InflateException: Binary XML file line #13 in com.wildberries.ru:layout/activity_main: Binary XML file line #13: You must supply a layout_width attribute., theme={InheritanceMap=[id=0x7f140346com.wildberries.ru:style/Theme.WB.NoActionBar.MainActivity, id=0x7f140344com.wildberries.ru:style/Theme.WB.NoActionBar, id=0x7f140340com.wildberries.ru:style/Theme.WB, id=0x7f140331com.wildberries.ru:style/Theme.MaterialComponents.Light.DarkActionBar.Bridge, id=0x7f140069com.wildberries.ru:style/Base.Theme.MaterialComponents.Light.DarkActionBar.Bridge, id=0x7f14008ecom.wildberries.ru:style/Base.V14.Theme.MaterialComponents.Light.DarkActionBar.Bridge, id=0x7f1402ebcom.wildberries.ru:style/Theme.AppCompat.Light.DarkActionBar, id=0x7f140051com.wildberries.ru:style/Base.Theme.AppCompat.Light.DarkActionBar, id=0x7f140050com.wildberries.ru:style/Base.Theme.AppCompat.Light, id=0x7f1400aecom.wildberries.ru:style/Base.V28.Theme.AppCompat.Light, id=0x7f1400abcom.wildberries.ru:style/Base.V26.Theme.AppCompat.Light, id=0x7f1400a5com.wildberries.ru:style/Base.V23.Theme.AppCompat.Light, id=0x7f1400a3com.wildberries.ru:style/Base.V22.Theme.AppCompat.Light, id=0x7f140099com.wildberries.ru:style/Base.V21.Theme.AppCompat.Light, id=0x7f1400b1com.wildberries.ru:style/Base.V7.Theme.AppCompat.Light, id=0x7f140171com.wildberries.ru:style/Platform.AppCompat.Light, id=0x7f14017ccom.wildberries.ru:style/Platform.V25.AppCompat.Light, id=0x1030241android:style/Theme.Material.Light.NoActionBar, id=0x1030237android:style/Theme.Material.Light, id=0x103000candroid:style/Theme.Light, id=0x1030005android:style/Theme], Themes=[com.wildberries.ru:style/Theme.WB.NoActionBar.MainActivity, forced, com.wildberries.ru:style/Theme.WB.Splash, forced, com.wildberries.ru:style/Theme.AppCompat.Empty, forced, android:style/Theme.DeviceDefault.Light.DarkActionBar, forced]}
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4169)
You can check it yourself. Launch the original application - it works. And then try to run the rebuilt application.
Yes i confirmed its bug, FYI you can fix the faulty apk by decompile > compile with -t json
. I will fix it soon
fixed in 1.2.4
Describe the bug During decompilation, the xmlns:app attribute of the FrameLayout root element turns into xmlns:ru. Xml from the original apk obtained via JADX:
Decompiled xml from apkeditor:
After the compilation of the same apk, this attribute disappears (xml from JADX):
If you fix xmlns:ru to xmlns:app in the file with your hands, then after compilation the attribute disappears anyway
To Reproduce Steps to reproduce the behavior:
java -jar bin/arsclib.jar d -t xml -i ../../tests/app.apk
Log/Stacktrace
Used apk file https://drive.google.com/file/d/1IZDCRmzyaqWdMex2x4vXh6jqcHVu6c0z/view?usp=sharing
Problematic file layout/activity_main.xml