projects
/
android
/
android-app-development-getting-started.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e6820df
)
compile_and_run_app.sh: adapt to the gradle project layout
author
Antonio Ospite <ao2@ao2.it>
Fri, 9 Oct 2015 17:41:05 +0000
(19:41 +0200)
committer
Antonio Ospite <ao2@ao2.it>
Fri, 9 Oct 2015 17:41:05 +0000
(19:41 +0200)
compile_and_run_app.sh
patch
|
blob
|
history
diff --git
a/compile_and_run_app.sh
b/compile_and_run_app.sh
index
306d535
..
922ccba
100755
(executable)
--- a/
compile_and_run_app.sh
+++ b/
compile_and_run_app.sh
@@
-14,10
+14,10
@@
else
{ echo "Install either xmllint or the XML::XPath perl module" 1>&2; exit 1; }
fi
{ 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 d
ebug
-adb -s emulator-5554 install -r b
in
/${APP_NAME}-debug.apk
+
./gradlew assembleD
ebug
+adb -s emulator-5554 install -r b
uild/outputs/apk
/${APP_NAME}-debug.apk
adb -s emulator-5554 -e shell am start -a android.intent.action.MAIN -n ${PACKAGE}/${PACKAGE}.${MAIN_ACTIVITY}
adb -s emulator-5554 -e shell am start -a android.intent.action.MAIN -n ${PACKAGE}/${PACKAGE}.${MAIN_ACTIVITY}