Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set package name of Xamarin.Android APK for Google Play submission

I have finished my app after 8 months work and I am attempting to submit to Google Play.

I sign the and align the APK properly and upload the APK to Google Play. Then I get the following message:

Upload failed Your APK's package name must be in the following format "com.example.myapp". It may contain letters (a-z), numbers, and underscores (_). It must start with a lowercase character.

Here is the AndroidManifest.xml file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"     android:installLocation="auto" package="com.vrocket.launcher" android:versionName="1.30.637" android:versionCode="1">
    <uses-sdk android:targetSdkVersion="14" />
    <application android:hardwareAccelerated="true" android:label="launchpad">
        <provider android:name="com.vrocket.launcher.LocalFileContentProvider" android:authorities="com.vrocket.launcher" />
    </application>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
</manifest>

As far as I can tell, the package name I specify here meets the requirements for Google Play submission. I did change my package name in the Android.Manifest since I started the project but I figure this would be pretty normal practice.

Has anyone had similar issues submitting a Xamarin.Android app to Google Play?

EDIT:

I have since figured out that the APK is being compiled with an old package name VRocket.VRocket. I found this out using the aapt tool in the Android SDK. Why is it not building with the package name specified in AndroidManifest.xml?

like image 894
Dan Cook Avatar asked Jan 20 '14 15:01

Dan Cook


People also ask

How do I name a package in the Google Play app?

You can find an app's package name in the URL of your app's Google Play Store listing. For example, the URL of an app page is play.google.com/store/apps/details? id=com.

Can we change package name of apk?

Then when you rebuild the apk with apktool, it should use aapt's --rename-manifest-package functionality to change the package name. After that, just resign the new apk and you should be good to go. And just to reiterate, you don't need to modify the package names of any classes.


1 Answers

The properties window in Visual Studio (assuming your writing in this) has a couple of settings you can change. These override the manifest when you compile. Perhaps this is where your stray name is coming in from? Same goes for the attributes you place in the class files in your code, Xamarin rewrites all of your manifest on compile. If you display hidden files in the solution tab and go to obj\Release\android this directory has the manifest that is generated for your app. Maybe it will shed some light.

like image 182
Christopher Richmond Avatar answered Sep 21 '22 08:09

Christopher Richmond