iBotPeaches / Apktool

A tool for reverse engineering Android apk files
https://apktool.org/
Apache License 2.0
19.82k stars 3.56k forks source link

error: Public symbol style/XXXXXXXXXX declared here is not defined. #1132

Closed Henry-T closed 8 years ago

Henry-T commented 8 years ago

I encounter this problem when repackaging.

apktool b failed because of

public.xml:787: error: Public symbol style/unipay_dialog_land declared here is not defined.

The style unipay_dialog_land is defined in android project like this:

<style name="unipay_dialog.land">
    <item name="android:layout_marginLeft">80dp</item>
    <item name="android:layout_marginRight">80dp</item>
</style>

So it is looking for unipay_dialog_land but declaration is unipay_dialog.land.

I don't know much about android theme. But as a feature, I think theme parenting is widely used. Maybe its result of some other things, haven't get a clue by now.

style/XXXXX not defined is the only error type

image

iBotPeaches commented 8 years ago

So the decode to the styles.xml fail and generate the wrong name? IE it wrote unipay_dialog.land when it should have used unipay_dialog_land.

Or was this just a badly written application that is only be detecting with a more restrictive aapt binary? APK would help :)

Henry-T commented 8 years ago

Hello, iBotPeaches. The problem is solved and it's not a issue of apktool.

My own tool chain generates public.xml from R.java. Aapt renames unipay_dialog.land to unipay_dialog_land during R.java generation phase.

jochasinga commented 5 years ago

So the decode to the styles.xml fail and generate the wrong name? IE it wrote unipay_dialog.land when it should have used unipay_dialog_land.

Or was this just a badly written application that is only be detecting with a more restrictive aapt binary? APK would help :)

Would be great to spin off this "naming convention" topic as a wiki since I've been seeing this more and more with apktool/aapt from non-english apks.

samriddha1712 commented 4 years ago

Can plz anyone help me with this problem. i have stucked with the same problem and i dont know how to solve it. i m on apktool version 2.4.1 and linux 2020

samriddha1712 commented 4 years ago

W: /home/kali/Desktop/Ugly/res/values/public.xml:66: error: Public symbol array/error_reporter declared here is not defined. W: /home/kali/Desktop/Ugly/res/values/public.xml:67: error: Public symbol array/sound_effect_array declared here is not defined.

samriddha1712 commented 4 years ago

Screenshot 2020-04-25 18:21:12

sakibguy commented 2 years ago

W: c:\dev\tiktok\com.zhiliaoapp.musically\res\values\public.xml:18893: error: no definition for declared symbol 'com.zhiliaoapp.musically:layout/a0j'. W: c:\dev\tiktok\com.zhiliaoapp.musically\res\values\public.xml:18895: error: no definition for declared symbol 'com.zhiliaoapp.musically:layout/a0l'. W: c:\dev\tiktok\com.zhiliaoapp.musically\res\values\public.xml:18902: error: no definition for declared symbol 'com.zhiliaoapp.musically:layout/a0s'. W: c:\dev\tiktok\com.zhiliaoapp.musically\res\values\public.xml:18907: error: no definition for declared symbol 'com.zhiliaoapp.musically:layout/a0x'. W: c:\dev\tiktok\com.zhiliaoapp.musically\res\values\public.xml:18911: error: no definition for declared symbol 'com.zhiliaoapp.musically:layout/a11'. W: error: failed linking references.