I need to remove "air." from package name. I'm get a Layout xml error when repackaging android app..


so, i'm doing on own app. made update older app build using native android. time, used adobe air... catch adobe likes append "air." front of package name without asking you. can't upload update because has new package name "air.com.mycompany.myapp" rather original "com.mycompany.myapp"

 

 

basically i'm going through guide..

http://helpx.adobe.com/air/kb/opt-out-air-application-analytics.html

 

 

i followed steps, made adjustments androidmanifest.xml asks.

 

 

but after going along above guide, no issues when step says

"run following command create resource file updated androidmanifest.xml:"

 

 

i run this..

 

 

    "/users/brybam/documents/eclipse/android-sdk-mac_x86/platform-tools/aapt" package -f -m androidmanifest.xml -f resources.arsc -i "/users/brybam/documents/eclipse/android-sdk-mac_x86/platforms/android-8/android.jar" -s ./res

 

 

 

 

but keep getting same error regarding xml files in res/layout

 

 

    ./res/layout/expandable_chooser_row.xml:1: error: error parsing xml: not well-formed (invalid token)

    ./res/layout/expandable_multiple_chooser_row.xml:1: error: error parsing xml: not well-formed (invalid token)

    ./res/layout/main.xml:1: error: error parsing xml: not well-formed (invalid token)

    ./res/layout/multiple_file_selection_panel.xml:1: error: error parsing xml: not well-formed (invalid token)

    ./res/layout/ssl_certificate_warning.xml:1: error: error parsing xml: not well-formed (invalid token)

 

 

 

 

the guide doesn't these xml files, , im not sure these or how handle them.

 

 

if go res/layout folder, , delete these (i know they're necessary. deleted them test, through rest of guide...)

 

 

i able through rest of steps in guide fine, make apk, , put on phone...only find out app crash moment try run it. because deleted layout xml files...but cant command need run above accept them!

 

 

so, earlier in guide have me use thing thing called "axmlprinter2.jar" make androidmanifest.xml readable can edit it.

 

 

i run this:

 

 

    java -jar "/users/brybam/desktop/repackage/axmlprinter2.jar" androidmanifest.xml > androidmanifest.xml.bk

 

 

this makes new file "androidmanifest.xml.bk" , can edit that.

 

 

so, thinking of these layout xml files, maybe run "axmlprinter2.jar" on them , edit them. because right if open them they're not human readable, , hard me work on them if they're not...

 

 

i tried thinking same thing...

 

 

    java -jar "/users/brybam/desktop/repackage/axmlprinter2.jar" main.xml > main.xml.bk

 

 

just blank file , console erorr when trying use axmlprinter2.jar on layout xml files...

 

    java.lang.arrayindexoutofboundsexception: 67

              at android.content.res.stringblock.getshort(stringblock.java:231)

              at android.content.res.stringblock.getstring(stringblock.java:91)

              at android.content.res.axmlresourceparser.getname(axmlresourceparser.java:140)

              at test.axmlprinter.main(axmlprinter.java:56)

 

 

so, think whole issue based around these xml files not being converted human readable before try , re-package....

 

 

 

edit:::

ok, found site talks error i'm getting it's in chinese, , after translating page...i'm still not versed terminal , stuff it.

 

 

it reads:

 

 

"error.

final conclusion:

in minsdkversion <= 7, axmlprinter2.jar can decompile xml file

greater 7 can not normal decompile xml file (androidmanifest.xml except)

give way share batch decompile xml file:

first, create *. txt file

stresses inside content authoring

for / r layout%% in (*. xml) @ java-jar axmlprinter2.jar "%% a" >> "%% a". txt

then txt file extension bat form, , bat file , axmlprinter2.jar on same directory decompiled xml layout directory

decompilation results can generated executing bat file multiple xml files."

 

 

- http://hi.baidu.com/ghcghc/item/ecbaa1ce997cb225a0b50ac2

 

 

maybe more know-how explain they're explaining? he's saying issue im seeing appears when you're using minsdk <=7 need use minsdk 8. understand work around? , how might go on mac terminal?

 

 

i wish adobe make easy remove "air." package name. if want convert old native devs air devs...the transition needs seamless. i'm have go native because can't update app have out on market air app.

hello~
     tried remove "air." package name in air application. , encounter same problem.
     not find solution decode xml inside res folder axmlprinter2.jar. , xml inside compressed unreadable.
     however, can copying structure of res folder. , go air sdk file path -  adobeair-sdk-folder/lib/android/lib/resources/

     replace file exists in res folder. , copy "values" folder res folder.

 

     hope solve problem~



More discussions in AIR Development


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support