new blackberry app world error “bar manifest file package version must be greater than …”

给你一囗甜甜゛ 提交于 2019-12-04 19:05:58

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)".

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

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!