I am implementing an Android application that has both live and office packages other then the main package. The manifest file is included inside the main package. The ic_launcher and app_name resources are included in both live and office for production and development versions, respectively.
When I try to access ic_launcher and app_name from the manifest file, it fails to read them - as show in this screen shot -.
This is the hierarchy of my app:
The resources I try to access are included under both live and office directories.
Is there anything I should add to be able to access them from manifest file?
I want to know how to implement a apk editor which can edit app name and version.
A way I can figure out takes several steps:
unzip apk file
modify app name and version in AndroidManifest.xml
replace the AndroidManifest.xml with the modified one
compress them into a new apk file
sign and align it
I can do all the steps above except Step 2. The AndroidManifest.xml file is compiled and cannot be parsed as normal xml file. I know apktool can compile and decompile it but I cannot find a easy way to run apktool on Android after several hours searching. I also cannot find any open-source apk editors(what I need is not only a apk editor, I want to develop another app based on it).
Finally I find some projects for reading and writing AXML(Android XML) and resources.arsc:
ArscEditor
axml
So I can wirte an apk builder with them. For more information, see my repo Auto.js-ApkBuilder.
I'm installing my project apk file on device and I can view all its database inside
/data/data/com.myapp
but did not find manifest file.
I go on
data/data/myapp
and I find only libs and database. I want to find manifiest file. How can I find the manifest file?
Note
My device is rooted.
The AndroidManifest.xml gets bundled by AAPT into the .apk file. It is not stored by itself on the file system.
For more information please look at how Building and Running is performed.
is there any way how to change, via changes in build.xml file, package name in time of build? Is it even possible?
I am trying to load an app to the Android Market. Below are the instructions I am using from the following website to prepare my application for submission:
http://android.xamarin.com/Documentation/Guides/Preparing_Package_for_Android_Marketplace
This following message is at the beginning of the instructions. But no instructions on how to add this to the AndroidManifest.xml file.
In order for the Android Market to accept your application, it must
define an application level icon. Ensure a line like this
exists in your AndroidManifest.xml:
<application android:label="MyApplication" android:icon="#drawable/icon">
A future release will provide better support for setting this.
The very first item has me stumped because I am getting the following error when I try to upload my application to the Market.
"The icon path specified by the manifest is not in the apk."
My question is, how do I add the application level icon statement to the manifest file?
Thanks.
p.s. The app deploys to both the emulator and local Android device in debug and release modes with no errors.
You can add a manifest file to your project by bringing up the property pages for your project, going to the Android Manifest tab, and doing the 'add AndroidManifest.xml' link.
Now there should be a file called "AndroidManifest.xml" in the Properties folder in your project.
Add the line specified to this file, replacing any existing element.
I had the same issue and it had nothing to do with the icon. I had an application class (GlobalVars extends Applications) and this was defined in the manifest as different: <application android:name=".GlobalVars" /> I deleted this and added android:name="com.example.myapp.GlobalVars" to the application declaration.
If it is the icon you may have drawable-hdpi, -ldpi, -mdpi folders, and no drawable folder. Or have a drawable folder but the icon is not in it.
Can you post the relevant snippet from your AndroidManifest.xml file? Whatever you have as the android:icon attribute ("#drawable/icon" in the example) is what the apk will be looking for. You can set this manually in the xml file, or by using the wizard in the ADT plugin for Eclipse. If this is set correctly, this means you should have a file called icon.png in one of your drawable folders. If you don't have an icon.png, can you post your folder structure?
In an app I've uploaded to the market, I have the same attribute - #drawable/icon - in my manifest, and therefore I am required to have a file called icon.png in my project. In my case, I have three different icon.png files in my various density-based drawable folders (res/drawable-hdpi, res/drawable-mdpi, res/drawable-ldpi). In your case, you need to at least have res/drawable/icon.png.
This error can also be generated if the manifest xml includes more than one < application > node.