new blackberry app world error "bar manifest file package version must be greater than ..."

1.1k views Asked by At

I've started getting a weird error message when trying to upload a playbook app update to BlackBerry world. I think this problem started after installing version 1.6.1 of their eclipse plugin.

The error message:

"The package version in your .bar manifest file for signals_playbook must be greater than the previous version, but lower than any the next release version added to the vendor portal. . Your .bar manifest file package version must be greater than 3.0. Correct your .bar manifest file and try again to continue."

My AndroidManifest.xml contains:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ca.rcp.mobile.cror.signals"
android:versionCode="7"
android:versionName="3.1" >

The Manifest file contained within the BAR shows this info:

Archive-Manifest-Version: 1.1
Archive-Created-By: Apk2Bar version 1.6.1

Package-Author: xxxxxxxx
Package-Author-Id: some hash xxxxxxxxx
Package-Name: xxxxx.cror.signals
Package-Id: some hash xxxxxxxxx
Package-Version: 1.0.7.1
Package-Version-Id: some hash xxxxxxxx
Package-Type: application
Package-Architecture: armle-v7
Package-Author-Certificate-Hash: some hash xxxxx

Application-Name: Railway Signals
Application-Id: some hash xxxxxxxx
Application-Version: 1.0.7.1
Application-Version-Id: some hash xxxxxxxxxxx
Application-Requires-System: Tablet OS/2.0.0.7109

My system:

Windows 7 x64 using Eclipse 3.7.2 with latest ADT and updates.

I can see why BlackBerry world is complaining, it thinks the version number is 1.0.7.1. How do I get it to show 3.1.0.0??

I tried editing the manifest file contained within the bar, saving it and resubmitting. But that didn't work (didn't think it would but was worth a try).

Does anyone know where is the 1.0.7.1 coming from? Can I override it?

Thanks Rob

3

There are 3 answers

0
Ted Hopp On

We suddenly started having the same problem with our builds. Evidently something changed in the BlackBerry build tools. Try setting the application's android:versionName attribute to a 4-part value (such as 3.1.0.1). BlackBerry has always used this format (major.minor.micro.build) for native apps. It seems that unless your Android manifest has the same format, the BlackBerry build tools fail to parse the versionName attribute and use a fall-back. From what I can tell, the fall-back is to use the value of android:versionCode as the micro version in a default application version code; that is it sets the app version in the .bar file manifest to

1.0.<android:versionCode value>.1

(I sure wouldn't want to be the engineer that had to defend implementing this behavior.)

An alternative approach is to create a custom manifest file that has the app version you want. Create a file named MANIFEST.MF in the same directory as AndroidManifest.xml. Then add the specific .bar manifest entries you want. For instance, it might be:

Archive-Manifest-Version: 1.1

Package-Version: 3.1.0.0
Application-Version: 3.1.0.0

Then open the project properties in Eclipse, navigate to BlackBerry, and for the "Custom BAR Manifest" drop-down, select "Add custom values (merge)".

0
varunkumar On

I also had the same problem but I fixed it by adding this line in my Android Manifest file android:versionCode="30" previously I had android:versionCode="29" so upgraded it by one .And the problem got fixed for me.

0
yakimant On

Thank you, Ted!

There is another link on this topic; http://supportforums.blackberry.com/t5/BlackBerry-World-Development/The-package-version-in-your-bar-manifest-file-for-New-Bundle/td-p/2754567

We started to notice problem after move to Gradle:

Before

AndroidManifest.xml:

android:versionCode="1312310309" android:versionName="2.28.4"

MANIFEST.MF:

Application-Version: 14.1231.309.0

After

AndroidManifest.xml:

android:versionCode="134" android:versionName="2.30.31402271059"

MANIFEST.MF

Application-Version: 1.0.134.0