diff --git a/bin/create b/bin/create index aa61be8a..6ff7034b 100755 --- a/bin/create +++ b/bin/create @@ -86,6 +86,7 @@ ACTIVITY_PATH="$PROJECT_PATH"/src/$PACKAGE_AS_PATH/$ACTIVITY.java MANIFEST_PATH="$PROJECT_PATH"/AndroidManifest.xml TARGET=$($ANDROID_BIN list targets | grep id: | tail -1 | cut -f 2 -d ' ' ) +API_LEVEL=$($ANDROID_BIN list target | grep "API level:" | tail -n 1 | awk '{gsub(" API level:", "");print}' | cut -f 2 -d ' ') # if this a distribution release no need to build a jar if [ ! -e "$BUILD_PATH"/cordova-$VERSION.jar ] && [ -d "$BUILD_PATH"/framework ] @@ -134,6 +135,7 @@ replace "s/__ID__/${PACKAGE}/g" "$ACTIVITY_PATH" cp "$BUILD_PATH"/bin/templates/project/AndroidManifest.xml "$MANIFEST_PATH" replace "s/__ACTIVITY__/${ACTIVITY}/g" "$MANIFEST_PATH" replace "s/__PACKAGE__/${PACKAGE}/g" "$MANIFEST_PATH" +replace "s/__APILEVEL__/${API_LEVEL}/g" "$MANIFEST_PATH" # creating cordova folder and copying emulate/debug/log/launch scripts mkdir "$PROJECT_PATH"/cordova