开发者

Uploading MonoDroid app to Android Market

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜