Android Market - Market requires versionName

jdonth

Member
Licensed User
Longtime User
Fixed: See post #5

This is my first attempt at posting to the Android Market and I am getting an apk error: Market requires versionName.

I am using the preferences module so I have a "locked" manifest file. The contents are below. I am also attaching the apk file I am trying to upload.

Any thoughts would be appreciated.

~Joe

(Using B4A 1.60).
----------------------------------------------------------
B4X:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="dtg.notify"
      android:versionCode="1"
      android:versionName="v1.11.19"
     android:installLocation="internalOnly">
      <uses-sdk android:minSdkVersion="4" />
      <supports-screens
          android:largeScreens="true"
          android:normalScreens="true"
          android:smallScreens="true"
          android:anyDensity="true"/>
    <application android:icon="@drawable/icon" android:label="PentaDee Private Notification">

        <activity android:windowSoftInputMode="stateHidden" android:launchMode="singleTop" android:name=".main"
                  android:label="PentaDee Private Notification" android:screenOrientation="unspecified">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <service android:name="rssreader"></service>
<receiver android:name="rssreader$rssreader_BR">
</receiver>
<activity android:name="anywheresoftware.b4a.objects.preferenceactivity"/>

    </application>
   <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>


</manifest>
 
Last edited:

NJDude

Expert
Licensed User
Longtime User
Have you tried changing the line:

android:versionName="v1.11.19"

To something else and see if it works?, I believe there might be certain restrictions or some kind of format, I have an app that doesn't show the WHOLE line (on the Market) it breaks after the 1st space, I don't get any errors, but on the market it doesn't show the whole string.

Don't know if my assumption is correct.
 

jdonth

Member
Licensed User
Longtime User
Thanks for the suggestion.

I changed it to "1" and it still failed.

Interesting, when I look at the app in the Settings/Manage Applications on my test device, it doesn't show the version either.

I'm still lost.
 

jdonth

Member
Licensed User
Longtime User
Your suggestion pointed me in the right direction.

The documentation for editing the manifest file to add the Preferences library says to insert the line just prior to the </application> line.

This is NOT correct if you have a <receiver.. module. It must be inserted after the last <application definition but before the <receiver definition.

Thanks for your help!
~Joe
 

jdonth

Member
Licensed User
Longtime User
Sure.

Here is (my edited) manifest.xml file (AndroidManifest.xml)
B4X:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 package="dtg.notify"
 android:versionCode="1"
 android:versionName="v1.0"
 android:installLocation="internalOnly">
 <uses-sdk android:minSdkVersion="4" />
 <supports-screens
  android:largeScreens="true"
  android:normalScreens="true"
  android:smallScreens="true"
  android:anyDensity="true"/>
 <application android:icon="@drawable/icon" android:label="PentaDee Private Notification">
  <activity android:windowSoftInputMode="stateHidden" android:launchMode="singleTop" android:name=".main"
   android:label="PentaDee Private Notification" android:screenOrientation="unspecified">
   <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
   </intent-filter>
  </activity>
  <activity android:name="anywheresoftware.b4a.objects.preferenceactivity"/>
  <service android:name="rssreader" />
  <receiver android:name="rssreader$rssreader_BR" />
 </application>
 <uses-permission android:name="android.permission.INTERNET"/>
 <uses-permission android:name="android.permission.VIBRATE"/>
</manifest>
and here is the one generated by B4A 1.60 (AndroidManifest-Example.xml) for comparison.
B4X:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="dtg.notify"
      android:versionCode="1"
      android:versionName="v1.11.19"
     android:installLocation="internalOnly">
      <uses-sdk android:minSdkVersion="4" />
      <supports-screens
          android:largeScreens="true"
          android:normalScreens="true"
          android:smallScreens="true"
          android:anyDensity="true"/>
    <application android:icon="@drawable/icon" android:label="PentaDee Private Notification">

        <activity android:windowSoftInputMode="stateHidden" android:launchMode="singleTop" android:name=".main"
                  android:label="PentaDee Private Notification" android:screenOrientation="unspecified">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <service android:name="rssreader"></service>

<receiver android:name="rssreader$rssreader_BR">

</receiver>

    </application>
   <uses-permission android:name="android.permission.INTERNET"/>

<uses-permission android:name="android.permission.VIBRATE"/>



</manifest>
 

jdonth

Member
Licensed User
Longtime User
I'm not so sure, Erel.

The reason I say that is that when I compiled the program and sent it to my test device (via the B4A bridge), and went into the Settings/Applications/Manage Applications, my program did NOT show a version description.

After making the change to the order within the manifest file and reinstalling (Alt-3), and repeating the Settings/Applications/Manage Settings the versionName was displayed.

However, with that said, I'm not going to argue with a B4A deity. :). I'm brand-new to this stuff.

~Joe
 

eps

Expert
Licensed User
Longtime User
Have you tried it without the "v"?

I don't have that in my versionName and it works fine. Whilst it is a text field, it is supposed to hold a numeric...

eta :

http://developer.android.com/guide/publishing/versioning.html

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.package.name"
android:versionCode="2"
android:versionName="1.1">
<application android:icon="@drawable/icon" android:label="@string/app_name">
...
</application>
</manifest>
 
Last edited:
Top