[Q]Error when compiling - Android Themes

I'm trying to edit framework-res.apk in APKManager. I'm decompiling the 9 pngs, editing, then resaving and then trying to compile the apk. It always gives me all these errors on my images. Am i missing a step before I compile? I'd appreciate if anyone could help!

desperate bump, if anyone could please help, either on here or on AIM, my screen name is "Grego" or even via messages, any help would be appreciated.

If u only want to change some png files, u can open the framework-res.apk with WinRAR oder Zip and replace the files u want. Compression set to "normal". U should notice, that the files have the same size.

bandit79 said:
If u only want to change some png files, u can open the framework-res.apk with WinRAR oder Zip and replace the files u want. Compression set to "normal". U should notice, that the files have the same size.
Click to expand...
Click to collapse
I pretty much replaced all of the png's in the framework-res along with the .9.pngs
C:\Users\greg\APK Manager\other\..\projects\framework-res.apk\res\values\public.
xml:3581: error: Public symbol drawable/textfield_disabled declared here is not
defined.
C:\Users\greg\APK Manager\other\..\projects\framework-res.apk\res\values\public.
xml:3582: error: Public symbol drawable/textfield_disabled_selected declared her
e is not defined.
C:\Users\greg\APK Manager\other\..\projects\framework-res.apk\res\values\public.
xml:3583: error: Public symbol drawable/textfield_pressed declared here is not d
efined.
C:\Users\greg\APK Manager\other\..\projects\framework-res.apk\res\values\public.
xml:2807: error: Public symbol drawable/textfield_search declared here is not de
fined.
C:\Users\greg\APK Manager\other\..\projects\framework-res.apk\res\values\public.
xml:3584: error: Public symbol drawable/textfield_search_default declared here i
s not defined.
C:\Users\greg\APK Manager\other\..\projects\framework-res.apk\res\values\public.
xml:2808: error: Public symbol drawable/textfield_search_empty declared here is
not defined.
there's a few examples of what i'm getting in the log.

yeah same here. i've got the same problem. using apk manager 4.8.
there might be a "solution" for it. didnt try it yet. but maybe it will help u.
http://forum.xda-developers.com/archive/index.php/t-933547.html

Related

uhh, another apk tool error, please help :(

here we go again. This is a error which is annoying me and i dont know a solution for, help pleaseeee.
Here are the first few lines of the error:
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
'adb' is not recognized as an internal or external command,
operable program or batch file.
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:1375: error: Multiple entry names declared for public entry identifier 0x28a in type id (webselect_dialog_listview vs zzz_puzzlelockpuzzlebg).
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:1369: Originally defined here.
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:1375: error: Public symbol id/zzz_puzzlelockpuzzlebg declared here is not defined.
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:1376: error: Multiple entry names declared for public entry identifier 0x28b in type id (tw_cursorhandle_view vs zzz_puzzlenotivvmlayout).
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:1370: Originally defined here.
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:1376: error: Public symbol id/zzz_puzzlenotivvmlayout declared here is not defined.
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:1377: error: Multiple entry names declared for public entry identifier 0x28c in type id (mode_normal vs zzz_puzzlenotivvmtext).
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:1371: Originally defined here.
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:1377: error: Public symbol id/zzz_puzzlenotivvmtext declared here is not defined.
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:2577: error: Multiple entry names declared for public entry identifier 0x3f8 in type string (missed_texts vs zzz_dual_clock_city_seoul).
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:2642: Originally defined here.
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:2577: error: Public symbol string/zzz_dual_clock_city_seoul declared here is not defined.
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:2636: error: Public symbol string/zzz_screen_captured_fail declared here is not defined.
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:2574: error: Multiple entry names declared for public entry identifier 0x3f5 in type string (missed_call vs zzz_skt_missing_sim_message1).
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:2639: Originally defined here.
C:\Users\Zohaib\Desktop\apk manager\other\..\projects\framework-res.apk\res\values\public.xml:2574: error: Public symbol string/zzz_skt_missing_sim_message1 declared here is not defined.
Click to expand...
Click to collapse
If i change the id it gives me this error:
"The string that has the error" has conflitcing public identifiers.
Click to expand...
Click to collapse
Help
You have some image "duplicates". It's probably because you have some PNGs named both something.png and something.9.png. When you compile you can say in a way that it only looks for the file name. Not the extension.
C0mpu13rFr34k said:
You have some image "duplicates". It's probably because you have some PNGs named both something.png and something.9.png. When you compile you can say in a way that it only looks for the file name. Not the extension.
Click to expand...
Click to collapse
So all I do is remove the image duplicates and it will go away??
Sent from my GT-I9000 using XDA App
webstar1 said:
So all I do is remove the image duplicates and it will go away??
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
Yes remove the duplicates you are not using but make sure that if the old unmodified image was a 9.png then it's best if your new one is too. Otherwise your might have weird stretching with some images...

Error 41 while building CyanogenMod

I've had no issues building cm7 in the past but now I keep getting the same error. I've spent the last two day googling and haven't had any luck I've checked java points the the right place, set ANDROID_JAVA_HOME=$JAVA_HOME and even deleted the entire repo and re-synced still nothing. Any ideas
Code:
Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.
target Java: CMParts (out/target/common/obj/APPS/CMParts_intermediates/classes)
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/SoundActivity.java:99: cannot find symbol
symbol : variable VIBRATE_IN_CALL
location: class android.provider.Settings.System
Settings.System.VIBRATE_IN_CALL, 1) != 0);
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/SoundActivity.java:150: cannot find symbol
symbol : variable VIBRATE_IN_CALL
location: class android.provider.Settings.System
Settings.System.putInt(getContentResolver(), Settings.System.VIBRATE_IN_CALL,
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/UIPowerWidgetActivity.java:80: cannot find symbol
symbol : variable EXPANDED_HIDE_SCROLLBAR
location: class android.provider.Settings.System
Settings.System.EXPANDED_HIDE_SCROLLBAR, 0) == 1));
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/UIPowerWidgetActivity.java:109: cannot find symbol
symbol : variable EXPANDED_HIDE_SCROLLBAR
location: class android.provider.Settings.System
Settings.System.putInt(getContentResolver(), Settings.System.EXPANDED_HIDE_SCROLLBAR,
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/UIStatusBarActivity.java:62: cannot find symbol
symbol : variable STATUS_BAR_COMPACT_CARRIER
location: class android.provider.Settings.System
Settings.System.STATUS_BAR_COMPACT_CARRIER, 0) == 1));
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/UIStatusBarActivity.java:82: cannot find symbol
symbol : variable STATUS_BAR_COMPACT_CARRIER
location: class android.provider.Settings.System
Settings.System.putInt(getContentResolver(), Settings.System.STATUS_BAR_COMPACT_CARRIER,
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/WidgetActivity.java:120: cannot find symbol
symbol : variable widget_max_buttons
location: class com.cyanogenmod.cmparts.R.string
Toast.makeText(this, R.string.widget_max_buttons, Toast.LENGTH_LONG).show();
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
7 errors
make: *** [out/target/common/obj/APPS/CMParts_intermediates/classes-full-debug.jar] Error 41
Try "make clean" before building. I had different errors while building CM7 earlier and i read this somewhere. It worked for me.
Thank you but that did not solve still got the same errors
Sent from my Droid using Tapatalk
jbirdvegas said:
Thank you but that did not solve still got the same errors
Sent from my Droid using Tapatalk
Click to expand...
Click to collapse
Hey Bro, try sending a PM to Kadalban... he'll sort it very fast.
SOLUTION
wisefreakz said:
Hey Bro, try sending a PM to Kadalban... he'll sort it very fast.
Click to expand...
Click to collapse
First thanks, but I tried and was returned invalid username?
Anyway I found the problem. The recent bump to 2.3.4 caused lots of symbol not found errors during the build. You can hack those out by slowly removing .java files but that causes instability. I noticed a comment cyanogen had posted on one of the frameworks_base_core commits. Long story short had to merge, up to date, frameworks and my vendor tree. New features = New code. I'm smacking myself now for not realizing this sooner.
Cool... hope to see your rom out soon.
Good luck
Sent from my Milestone using XDA Premium App
I keep getting the following error
When trying to build the ROM.
The sync went smoothly and now I am trying to build and get this error:
"
...
SecuritySettings.java:421: cannot find symbol
symbol : variable AuthentecHelper
location: class com.android.settings.SecuritySettings
case AuthentecHelper.eAM_STATUS_USER_CANCELED:
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
42 errors
make: *** [out/target/common/obj/APPS/Settings_intermediates/classes-full-debug.jar] Error 41
"
Been searching for a couple of hours for the solution but no luck.
Any1 has an idea?

[Q][NeedHelp] Translate MIUI ROM problems

Hi ! I'm translating drZMIUIv4-2.2.24 Beta10 ROM in french, but I'm facing problem.
I began by framework-res.apk
Added values-fr-rFR in /res directory of apk
Added modified strings.xml, and arrays.xml, plural.xml, integer.xml from Nexus S rom ( Only some lines different for strings.xml, Didn't edit other files )
Recompiled Apk
Ho yeah, when I want to recompile apk, without changing anything (When I edit it too), I've these errors :
E:\apktool\projects\framework-res.apk\res\values\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
E:\apktool\projects\framework-res.apk\res\values\plurals.xml:79: error: Found tag </item> where </plurals> is expected
E:\apktool\projects\framework-res.apk\res\values-zh-rCN\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
E:\apktool\projects\framework-res.apk\res\values-zh-rCN\plurals.xml:79: error: Found tag </item> where </plurals> is expected
Click to expand...
Click to collapse
This line is :
Code:
<item quantity="other">%d of %d</item>
And I didn't edit these files, so I tried to replace with nexus S line :
Code:
[B]%1$d of %2$d[/B]
no error during compilation but same FCs problem after.
On google, I found that sometimes % in file give this error and just replace it by %% So I did it and same result as with Nexus S line
So, after, I signed it, and replace original file in my phone but when I want to boot, All major apps like Home, Keyboard, Google apps ... give FC
INFO
Trying to decompile/recompile without changing anything except the 79th line in plurals file ( to avoid compilation error ), give FC when replace....
I'm using Apk Multitool
So if anyone has allready seen these error and or translated ROM or just can help me, I'm waiting for your answers !
My fr strings.xml in attachment.
My modified framework-res.apk too
And extracted modified framework-res.apk folder
/!\ DONT USE IT /!\
Thanks in advance !
( Hope I posted in right section ? )
(Link to French forum : http://forum.miui-france.org/index.php?/topic/2002-traduction-miui-ics-drzmiuiv4-2224-beta10/ )

[HELP] Error while recompiling SemcClock.apk {SOLVED}

Hello everyone
I am trying to convert SemcClock.apk (the one from Honami) from white to black.
I edited the styles.xml and so far everything is ok.
When i try to recompile the apk i get this error:
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\alarm_alert.xml:5: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\alarm_alert.xml:5: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\alarm_alert.xml:6: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\alarm_alert_tablet_horizontal.xml:6: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\alarm_alert_tablet_vertical.xml:8: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\alarm_alert_tablet_vertical.xml:18: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\alarm_digital_clock.xml:2: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\alarm_time.xml:2: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\alarm_time_delete.xml:2: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\alarm_week.xml:2: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\context_menu_header.xml:2: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\current_time_tablet.xml:2: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\current_time_tablet.xml:5: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\desk_clock_ics.xml:2: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\desk_clock_ics.xml:8: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\desk_clock_tablet.xml:2: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
C:\AndroidMultitool\Decompiled_apk\SemcClock\res\layout\desk_clock_tablet.xml:5: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
and many other lines (errors only in res/layout)!
Tried with apktool also but same problem!
I get this error even if i just decompile and recompile the apk without making any changes.
Anyone can help me please?
Thanks in advance!
You must use 4.2 framework-res for decompiling and compiling.
Number 3 (locale based direction) was added in 4.2.
Or change all lines to "ltr" (left to right).
peetr_ said:
You must use 4.2 framework-res for decompiling and compiling.
Number 3 (locale based direction) was added in 4.2.
Or change all lines to "ltr" (left to right).
Click to expand...
Click to collapse
To many lines bro to change from "3" to "ltr".
Do you have the 4.2 framework?
Thanks!
I am on phone. Take 4.2 framework-res from Z.
peetr_ said:
I am on phone. Take 4.2 framework-res from Z.
Click to expand...
Click to collapse
I was just doing that! Thanks!
DaRk-L0rD said:
I was just doing that! Thanks!
Click to expand...
Click to collapse
@peetr_ worked! Thanks mate!
peetr_ said:
You must use 4.2 framework-res for decompiling and compiling.
Number 3 (locale based direction) was added in 4.2.
Or change all lines to "ltr" (left to right).
Click to expand...
Click to collapse
DaRk-L0rD said:
To many lines bro to change from "3" to "ltr".
Do you have the 4.2 framework?
Thanks!
Click to expand...
Click to collapse
hi , i write this because i just want let you know , because you are in wrong way
i am from XPERIA Arc and i want to fully port Honami SemcClock.apk for my phone
i have below 37 errors
C:\Users\DELL\Desktop\SemcClock\res\layout\lap_item_tablet.xml:2: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
and one more error here
C:\Users\DELL\Desktop\SemcClock\res\layout\main.xml:4: error: Error: Integer types not allowed (at 'layoutDirection' with value '0').
i replaced all the "3" to "locale"
and replaced the "0" to "ltr"
and i compile it without any errors
it is because we can't use numbers , i noticed this from here : http://developer.android.com/reference/android/view/View.html
you can search for "android:layoutDirection" so you will find this:
Code:
android:layoutDirection
Defines the direction of layout drawing. This typically is associated with writing direction of the language script used. The possible values are "ltr" for Left-to-Right, "rtl" for Right-to-Left, "locale" and "inherit" from parent view. If there is nothing to inherit, "locale" is used. "locale" falls back to "en-US". "ltr" is the direction used in "en-US". The default for this attribute is "inherit".
Must be one of the following constant values.
Constant Value Description
ltr 0 Left-to-Right
rtl 1 Right-to-Left
inherit 2 Inherit from parent
locale 3 Locale
This corresponds to the global attribute resource symbol layoutDirection.
Related Methods
setLayoutDirection(int)
now i have this errors , can you help?
C:\Users\DELL\Desktop\clock\cib+SemcClock\res\layout\desk_clock_ics.xml:14: error: No resource identifier found for attribute 'fontFamily' in package 'android'
C:\Users\DELL\Desktop\clock\cib+SemcClock\res\layout\desk_clock_ics_night_mode.xml:14: error: No resource identifier found for attribute 'fontFamily' in package 'android'
C:\Users\DELL\Desktop\clock\cib+SemcClock\res\layout\timer_time_picker.xml:5: error: No resource identifier found for attribute 'textAlignment' in package 'android'
C:\Users\DELL\Desktop\clock\cib+SemcClock\res\layout\timer_time_picker.xml:7: error: No resource identifier found for attribute 'textAlignment' in package 'android'
EAGLEBOOY said:
hi , i write this because i just want let you know , because you are in wrong way
i am from XPERIA Arc and i want to fully port Honami SemcClock.apk for my phone
i have below 37 errors
C:\Users\DELL\Desktop\SemcClock\res\layout\lap_item_tablet.xml:2: error: Error: Integer types not allowed (at 'layoutDirection' with value '3').
and one more error here
C:\Users\DELL\Desktop\SemcClock\res\layout\main.xml:4: error: Error: Integer types not allowed (at 'layoutDirection' with value '0').
i replaced all the "3" to "locale"
and replaced the "0" to "ltr"
and i compile it without any errors
it is because we can't use numbers , i noticed this from here : http://developer.android.com/reference/android/view/View.html
you can search for "android:layoutDirection" so you will find this:
Code:
android:layoutDirection
Defines the direction of layout drawing. This typically is associated with writing direction of the language script used. The possible values are "ltr" for Left-to-Right, "rtl" for Right-to-Left, "locale" and "inherit" from parent view. If there is nothing to inherit, "locale" is used. "locale" falls back to "en-US". "ltr" is the direction used in "en-US". The default for this attribute is "inherit".
Must be one of the following constant values.
Constant Value Description
ltr 0 Left-to-Right
rtl 1 Right-to-Left
inherit 2 Inherit from parent
locale 3 Locale
This corresponds to the global attribute resource symbol layoutDirection.
Related Methods
setLayoutDirection(int)
Click to expand...
Click to collapse
Thanks mate. I alredy solved the problem using framework-res.apk from honami. I was able to theme it also without any problems
Arc has jb or ics mate?
DaRk-L0rD said:
Thanks mate. I alredy solved the problem using framework-res.apk from honami. I was able to theme it also without any problems
Arc has jb or ics mate?
Click to expand...
Click to collapse
ics
can you help me about the above 4 errors?
i don't want to change my framework because i want to use it for my arc and also don't want to change my arc framework
i hope you can help me

[Q] Replace XML files

Hi.
I'm new at developing Xposed module, so i've a lot to learn.
I would use Xposed to replace some xml files. I've write some code but that doesn't work (it doesn't even compile): for example
Code:
resparam.res.setReplacement("com.name.application", "xml", "file", modRes.fwd(R.xml.file));
But that doesn't ever recognize R.xml.file. I've add some lines to R.java:
Code:
public static final class xml {
public static final int file=0x7f040000;
}
Just to make it recognize the name, but then i've a lot of error:
PHP:
file.xml:2: error: No resource identifier found for attribute 'attribute' in package 'com.example.xtest'
And so on.
It's very likely that this code has no sense, so i'm asking you: how can i replace some xml files?
Thanks!

Categories

Resources