{ echo "Install either xmllint or the XML::XPath perl module" 1>&2; exit 1; }
fi
-APP_NAME=$($XPATH "string(//project/@name)" build.xml)
-PACKAGE=$($XPATH "string(//manifest/@package)" AndroidManifest.xml)
-MAIN_ACTIVITY=$($XPATH "string(//activity[1]/@*[local-name() = 'name'])" AndroidManifest.xml)
+APP_NAME=$($XPATH "string(//string[@name = 'app_name'])" src/main/res/values/strings.xml)
+PACKAGE=$($XPATH "string(//manifest/@package)" src/main/AndroidManifest.xml)
+MAIN_ACTIVITY=$($XPATH "string(//activity[1]/@*[local-name() = 'name'])" src/main/AndroidManifest.xml)
-ant debug
-adb -s emulator-5554 install -r bin/${APP_NAME}-debug.apk
+./gradlew assembleDebug
+adb -s emulator-5554 install -r build/outputs/apk/${APP_NAME}-debug.apk
adb -s emulator-5554 -e shell am start -a android.intent.action.MAIN -n ${PACKAGE}/${PACKAGE}.${MAIN_ACTIVITY}