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

Android™ Runtime Development

Reply
Developer
kanaksony
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha
Accepted Solution

Android Application Repackaging Problem

Hi all,

 

I am checking compatibility of my android app using Online Tool for Android apps. I am getting a strange error I have been looking for this issue since 3 days but didn't found any hints..

 

I am attaching screenshot for your reference.  

 

I am getting the Same error if I use BB Plugin for ADT.

 

Description Resource Path Location Type
[ERROR] [BarGenerator] Empty region!
m-Spectrum D:\Work\Android_Codes\myProject\bin\my.apk BlackBerry Packaging Problem

 

Please help.

 


Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Please use plain text.
Developer
kanaksony
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: Android Application Repackaging Problem

Hi,

 

I verified APK using Command line tool and come to know some details about above issue - 

 

[ERROR] [Apk2BarVerifier] Empty region!
java.lang.IllegalArgumentException: Empty region!
at javax.imageio.ImageReader.computeRegions(Unknown Source)
at com.sun.imageio.plugins.wbmp.WBMPImageReader.read(Unknown Source)
at javax.imageio.ImageIO.read(Unknown Source)
at javax.imageio.ImageIO.read(Unknown Source)
at net.rim.tools.apk2bar.packager.AndroidManifestParser.extractApplicationMetadata(AndroidManifestParser.java:287)
at net.rim.tools.apk2bar.packager.AndroidManifestParser.parseValues(AndroidManifestParser.java:92)
at net.rim.tools.apk2bar.packager.AndroidManifestParser.parseManifest(AndroidManifestParser.java:76)
at net.rim.tools.apk2bar.verifier.Apk2BarVerifier.verifyApk(Apk2BarVerifier.java:333)
at net.rim.tools.apk2bar.verifier.Apk2BarVerifier.apk2BarVerify(Apk2BarVerifier.java:193)
at net.rim.tools.apk2bar.verifier.Apk2BarVerifier.main(Apk2BarVerifier.java:133)
Total apk(s) verified: 1

 

 

Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Please use plain text.
Developer
kanaksony
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: Android Application Repackaging Problem

I solved the problem. These 3 lines me made me understand the problem actually. Its explaining that something wrong happened while parsing AndroidManifest, which is 

 

at net.rim.tools.apk2bar.packager.AndroidManifestParser.extractApplicationMetadata(AndroidManifestParser.java:287)

at net.rim.tools.apk2bar.packager.AndroidManifestParser.parseValues(AndroidManifestParser.java:92)
at net.rim.tools.apk2bar.packager.AndroidManifestParser.parseManifest(AndroidManifestParser.java:76)

 

And the problem is something related to Image.

at javax.imageio.ImageReader.computeRegions(Unknown Source)
at com.sun.imageio.plugins.wbmp.WBMPImageReader.read(Unknown Source)
at javax.imageio.ImageIO.read(Unknown Source)
at javax.imageio.ImageIO.read(Unknown Source)

 

So, in AndroidManifest there is only one image which was application Icon. I have not bundled the correct size of Image required for BB10. Mine was a small Image and when I replaced it with bigger image. the problem was solved.. :smileyhappy:


Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Please use plain text.