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
Posts: 19
Registered: ‎01-18-2013
My Device: Z10 10.2
Accepted Solution

repackaging android code-apk "android sdk path is not set"

Hello Friends,

I try to convert my android code for playbook OS

when I try to repackaging it I got follwing error.

 

 

[2013-05-15 12:18:44 - Hello] Status ERROR: net.rim.ajde code=0 Click the "Details" button to see details null children=[Status ERROR: com.qnx.tools.bbt.core code=0 Packaging failed:-1

 

C:\Documents and Settings\Administrator\桌面\eclipse>set LIB=C:\Documents and Settings\Administrator\桌面\eclipse\plugins\net.rim.ajde_1.5.2.201302260701\blackberry.tools.SDK\bin\\..\lib

 

C:\Documents and Settings\Administrator\桌面\eclipse>java -Djava.awt.headless=true -Xmx512M -cp "C:\Documents and Settings\Administrator\桌面\eclipse\plugins\net.rim.ajde_1.5.2.201302260701\blackberry.tools.SDK\bin\\..\lib\BARPackager.jar;C:\Documents and Settings\Administrator\桌面\eclipse\plugins\net.rim.ajde_1.5.2.201302260701\blackberry.tools.SDK\bin\\..\lib\Apk2Bar.jar" net.rim.tools.apk2bar.Apk2Bar "C:\Documents and Settings\Administrator\workspace\Hello\bin\Hello.apk" "C:\Documents and Settings\Administrator\桌面\sdk\" -t "C:\Documents and Settings\Administrator\workspace\Hello\bin\classes" -d "C:\Documents and Settings\Administrator\Local Settings\Application Data\Research In Motion\debugtoken1.bar" Apk2Bar version 1.5.2

 

Research In Motion Ltd ? 2012 All rights reserved.

[ERROR] Invalid argument: C:\Documents and Settings\Administrator\桌面\sdk" -t C:\Documents

[ERROR] Invalid argument: and

[ERROR] Invalid argument: Settings\Administrator\workspace\Hello\bin\classes -d C:\Documents

[ERROR] Invalid argument: and

[ERROR] Invalid argument: Settings\Administrator\Local

[ERROR] Invalid argument: Settings\Application

[ERROR] Invalid argument: Data\Research

[ERROR] Invalid argument: In

[ERROR] Invalid argument: Motion\debugtoken1.bar

[ERROR] Android SDK path is not set.

apk2bar is a tool to verify & convert apk files to bar files.

 

Usage :

        apk2bar [] [] [-t ][-w[1-5]] [-a ] [-d []] [-m] [-rv] [-etr|-etl|-etn] [-ci] [-la] [-R] [-os ]

 

Where:

<source file(s) or folder(s)> - the relative or absolute path(s) of .apk, .cfg, .mf, and .png file(s) or folder(s) containing the file(s) for conversion

[<blacklist file>] - optional path to a custom blacklist file; If specified along with the -w[<l>] option will force re-verification

[<Android-SDK path>] - the path of Android SDK; If not specified set %ANDROID_HOME% system environment variable

[-v] - prints tool version

[-t <bar folder>] - optional target folder where the bar(s) will be generated; Otherwise the apk source folder is used [-w[1-5]] - filter out bar generation for warnings of or above this level [1..5];-w with no level means -w5

[-a <author name>] - Package-Author name for the bar files otherwise will use %USERNAME% or $USER

[-d [<debug-token file>]] - set Application-Development-Mode: true with optional debug-token .bar file to be used for the Package-Author /Id attributes

[-m] - use custom manifest file(s); e.g. Helloworld.apk to use Helloworld.MF

[-ma] - add custom attributes from custom manifest file(s); e.g. Helloworld.apk to include attributes from Helloworld.MF

[-ci] - use custom icon file(s) for each app 1st Entry-Point; e.g. Helloworld.apk to use Helloworld.png

[-etr |-etl | -etn] - Entry-Point-Name -truncate-right (default), -truncate-left or no-truncation

[-la<n>] - pick launchable-activity n | n=0, 1, 2,.. | 0 (default) = all, 1 = 1st, .., 100 = last

[-os <version>] - optional specification of the minimal target Tablet OS version; e.g. 2.1, 10, or 10.0.9

[-r] - find .apk, .cfg, .mf, and .png files recursively in specified folders

Summary: Total Apk files # 1 succeeded: 0 skipped: 0 failed: 0

Summary: [5]=10; [4]=0; [3]=0; [2]=0; [1]=0;

Impact Legend: [5]=Severe; [4]=High /context; [3]=Medium /context; [2]=Medium-low /context; [1]=Minor; null]

 

it says that "Android SDK path is not set.", but I already set the android sdk path and download the android 2.3.3.

Could it be I contain chinese word in the sdk path?

 

Information:

eclipse: verdion 3.8

JDK: JDK 6

 

Please help me to resolve it.

 

Thanks & Regards

 

New Member
Posts: 3
Registered: ‎05-16-2013
My Device: BB 10

Re: repackaging android code-apk "android sdk path is not set"

Hi,

 

I have the exact same issue, I have tried everything. I just don't understand this error, it doesn't make any sense.

 

Any help is welcome, I've been stock on this for a day.

 

R.

Developer
Posts: 19
Registered: ‎01-18-2013
My Device: Z10 10.2

Re: repackaging android code-apk "android sdk path is not set"

I sovled the problem by reinstall my android sdk.

 

Don't use the sdk in the adt bundle for window.

 

Only android sdk. It should work.

 

Go to http://developer.android.com/sdk/index.html

 

and click "USE AN EXISTING IDE"

 

then "Download the SDK tools for windows"

 

Hope it will help you.

 

New Member
Posts: 3
Registered: ‎05-16-2013
My Device: BB 10

Re: repackaging android code-apk "android sdk path is not set"

Hi,

 

Thanks for the reply Lazior.

 

I'm trying to do everything on Eclipse, same Eclipse I have configured and working for normal Android development, that's why I don't understand why is not working. 

 

I'll try to download the SDK again, but I would love to be able to do this with my current workspace to simplify things.

 

Regards.

New Member
Posts: 1
Registered: ‎05-17-2013
My Device: Z10

Re: repackaging android code-apk "android sdk path is not set"

Hello,

I'm on Mac OS, I get the same issue. I try a lot of things, reinstall a clean eclipse and download all plugin & sdk separetly or download the android on with the plugin and sdk included. Nothing work.

Any help will be welcome.

Thanks

Visitor
Posts: 1
Registered: ‎05-17-2013
My Device: developer

Re: repackaging android code-apk "android sdk path is not set"

Mac OS X here too. Same issue.

I've tried playing around with launchctl setenv for the ANDROID_HOME setting but no luck.
Developer
Posts: 122
Registered: ‎07-26-2008
My Device: 8320, 9500, 9700

Re: repackaging android code-apk "android sdk path is not set"

I've got the same issue on Windows since the ADT 22 update.

New Contributor
Posts: 5
Registered: ‎03-19-2012
My Device: Playbook

Re: repackaging android code-apk "android sdk path is not set"

Same here. Definitely an issue with v 22 of Android tools and apk2bar. Can't figure it out.

Developer
Posts: 122
Registered: ‎07-26-2008
My Device: 8320, 9500, 9700

Re: repackaging android code-apk "android sdk path is not set"

As posted on this board, the BlackBerry tools are not compatible with r22 and won't be until some time in June.  

 

In the end I have created a separate develoment environment with ADT 21.1, you can download that here then install it in Eclipse as an "Archive".  The SDK is trickier, I couldn't find a way to install an old version of the Android SDK and in the end I was lucky to find that I had a backup of SDK 21.

 

Moral of the story is always backup Eclipse and the Android SDK before upgrading .

 

IMO "Early June" is not really good enough, BB need to be on top of this.

 

Visitor
Posts: 1
Registered: ‎05-21-2013
My Device: Developer

Re: repackaging android code-apk "android sdk path is not set"

[ Edited ]

Hi, I had the same problem and I tried to resolve it by looking inside Apk2bar.jar (decompiled it with jd-gui) . What I found was that starting with r22, aapt.exe and dexdump.exe were moved from "platform-tools" to "build-tools/17.0.0" so copying them (along with the rest of the files and folders) from build-tools to platform tools should do the trick and let you make the build.

 

Hope this helps.