Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Developer
Posts: 29
Registered: ‎12-28-2012
My Device: 9199
My Carrier: 962334234

Fail to convert Android AIR APK to BB10 AIR APK-BAR

Hello,

 

My apps are both on Android, iOS and BB10, so I tried to convert my first one from Android AIR APK to BB10 BAR to replace the current version that will be removed as you mention before (big confusion, not !? Smiley Happy

 

Problem 1:
Well, after spending the all day, I ended up with a compiled BAR that I couldn't deploy from your dev web site because package id shows as changed (what was really changed was that AIR for Android inject air. before the package name)
- Expanding the bar file and changing the manifest file to remove the air. should be the way to go ?

 

Problem 2:
2.1. Using the command-line gui v2 beta (Blackerry APK Packager), I deployed to the simulator (last version) and I get the following error when I run the app: Unfortunally, "my app name" has stopped.
2.2. I tried with a new application (test application only with a test label - Flex 4.12 + AIR 4.0) and I get the same error
2.3. I tried using "The development mode from the Packager" and the deployer shows the following error: "result::failure 550 ApplicationModeMismatchError"

I business day invested on this with a lot of errors and very unstable plataform. Usually you don't answers my questions (I got used to that from BB) but I hope this time be different because was you to decided to remove AIR from your plataform.

 

Looking forward to be surprised with solutions in less than in 1 month !

 

Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: Fail to convert Android AIR APK to BB10 AIR APK-BAR

The steps to fix your first problem are outlined at http://supportforums.blackberry.com/t5/Android-Runtime-Development/Retaining-the-Original-Package-Na...


Read my thoughts on BlackBerry Development at news.ebscer.com
New Developer
Posts: 29
Registered: ‎12-28-2012
My Device: 9199
My Carrier: 962334234

Re: Fail to convert Android AIR APK to BB10 AIR APK-BAR

Thank you very much Ebscer.

 

Now about problem 2, anyone ?

I tried a very, very simple hello world:

1. Apache Flex 4.12 + AIR 4.0 on FB 4.7

2. Export to APK

3. Convert to BAR and deploy thru "BlackBerry APK Maanager" from command line tools 2

4. When I open the app I get the error !

BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Fail to convert Android AIR APK to BB10 AIR APK-BAR

Are you using BlackBerry 10 Simulator version 10.2.1.x?  Previous simulator releases do not support the AIR Captive Runtime for Android.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 29
Registered: ‎12-28-2012
My Device: 9199
My Carrier: 962334234

Re: Fail to convert Android AIR APK to BB10 AIR APK-BAR

Hello,


Thank you for answer my question !

 

Yes. I have done the download, of the last simulator on the same day that I have created the post.

 

Enviorment:
- Mac OS X
- The last version of the simulator
- Flash Builder 4.7
- Apache Flex 4.12
- Adobe AIR 4.0 (with captive runtime)

 

Test:
- A simple hello world
- Exported to APK
- Convert the APK to BAR
- Deploy on the simulator

BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Fail to convert Android AIR APK to BB10 AIR APK-BAR

Ok, can you check that there isn't another copy of a "Hello World" application that has the same Package-Id in the simulator?  Delete any test apps in the simulator.

 

ApplicationModeMismatchError is usually caused by trying to install a debug build of an application (debug APK in this case) on top of a release version (that has the same package ID).

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 29
Registered: ‎12-28-2012
My Device: 9199
My Carrier: 962334234

Re: Fail to convert Android AIR APK to BB10 AIR APK-BAR

Thank you for the tip.

 

I will do a new clean test and report again my results.

New Developer
Posts: 29
Registered: ‎12-28-2012
My Device: 9199
My Carrier: 962334234

Re: Fail to convert Android AIR APK to BB10 AIR APK-BAR

I started over.

Simulator complete cleaned and a complete new Hello World test project.

 

1. First I have created my APK from FB 4.7 (without any manually manipulation of the file).
2. Then I repackaged with your BlackBerry APK Packager tool and without the "Development Mode" option activated (image 1)

 

Exporting_Non_DevelopmentMode.png

Complete log:

 

[HelloWorld.apk]Smiley Sadres/drawable/icon.png) icon could not be found:impact=3
[HelloWorld.apk]Smiley Sadres/drawable-hdpi/icon.png) found an alternate icon with better size:impact=1
[HelloWorld.apk]Smiley Frustratedummary: [5]=0; [4]=0; [3]=1; [2]=0; [1]=1;
[HelloWorld.apk]:Log file generated: /Users/hugo/Desktop/HelloWorld.wrn
[HelloWorld.bar]:BAR successfully generated

Starting blackberry-deploy -gui /Users/hugo/Desktop/HelloWorld.bar -noSync
Info: Application-Development-Mode is false, sync disabled
Info: Sending request: INSTALL
Info: Action: Install
Info: File size: 11014819
Info: Installing ...
Info: Processing 11014819 bytes
Info: Progress 100%...
actual_dname::air.com.helloworld.testEAbUi0Z06Qxum99S_6vpe.Y
actual_id::testEAbUi0Z06Qxum99S_6vpe-Y
actual_version::1.100.0.0
result::success

 

3. And then deployed on the simulator (image 2).

 

Deploy_Non_DevelopmentMode.png

4. Result on the simulator (image 3)

 

Simulator__Non_DevelopmentMode.png

5. Deploy using "Development Mode" on your packager (image 4)

 

Deploy_DevelopmentMode.png

 

I hope with all this very detailed information, logs and screenshots you could help me.

 

Thanks in advance.

 

BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Fail to convert Android AIR APK to BB10 AIR APK-BAR

Check off the "Sign" checkbox in step 2 and you should be all set.  You need to sign since the APK and BAR file are both release mode binaries.

 

If you wanted to use the Development mode option, you'd need to use a debug APK.  

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 29
Registered: ‎12-28-2012
My Device: 9199
My Carrier: 962334234

Re: Fail to convert Android AIR APK to BB10 AIR APK-BAR

Hello MSohm,

 

That didn't solved the problem.

If I submit a new release from the developer portal, you will ensure that you will test it before approve (in the past I had problems because the BB approved a file with problems related with AIR and BB that I couldn't see because I don't have the device) ?