0
votes

I have created a Sencha Touch app for Android. I am using Sencha Architect 2.2.1 and I packaged it for Android using Sencha CMD 3.1.1.274. I have installed all the APIs on Android SDK from level 14 to level 17. I packaged the application using Command Prompt and the following command: sencha app package build packager.json The problem is that it only gives me an APK in my output folder if the API level is set at 17. If I keep the API level 16 or 15, it shows me the following error :

Error: Target id is not valid. Use 'android.bat list targets' to get the target
ids.


""C:/Program Files/Android/sdk\tools\android" create project --target android-16
 --name BeatlesLyrics --activity STActivity --path "build/apks\/" --package com.
mycompany.BeatlesLyrics"
Can not open destination file for writing
Failed to copy packager library
Failed to package application
Copy operation failed src=C:\Users\Shaishav\bin\Sencha\Cmd\3.1.1.274\stbuild\st-
res/android/\nimblekit.jar dst=build/apks\\libs\nimblekit.jar

[ERR] stbuild exited with non-zero code : 3

I have installed the API 16 and 15 too in android sdk. So why am i getting this error?

1
This error occurs when you do not have the required APILevels installed in your SDK. Make sure you have them. Go to the Android SDK folder and open the platforms folder to see what API Levels you have in the SDK.GenieWanted
@Geeniewanted I checked my platform folder and it only has android 17. Will it show the particular API level only after ALL the subpackages in the API are installed?shaishgandhi
Perhaps, you might be missing some sub packages inside API Level 17. Go ahead and install the packages for 17 and see if that helps. Should be good.GenieWanted
@Geeniewanted Thanks i solved my problem :)shaishgandhi
good to hear that! what did you do to make it work?GenieWanted

1 Answers

2
votes
  1. Use android.bat list targets
  2. Make a note of the "API Level"
  3. Use the same in "androidAPILevel" in the config file