myFirstApp android app
2014-03-29 22:38
471 查看
之前作为业余时间的兴趣,玩过android app。近期学习ros发现rosjava早晚要用到。因此,把android app和java的经验也要攒起来。
重新玩下这个。
adb devices 阶段
ddms配置阶段
在仅有apk情况下,可以使用如下命令行方式adb
1. 安装程序 adb install ebook.apk
2. 重安装程序 adb install -r ebook.apk
3. 卸载程序 adb uninstall net.blogjava.mobile.ebook
只卸载应用程序,保留缓冲和数据 adb uninstall -k net.blogjava.mobile.ebook
4. 指定具体机器
如果机器上有多个模拟器或真机实例,需要使用-s命令行参数指定具体的模拟器或真机。
5.直接运行程序。
A. 在emulator-5554模拟器上运行ebook.apk
adb -s emulator-5554 shell am start -n net.blogjava.mobile.ebook/net.blogjava.mobile.ebook.Main
B. 在真机上运行ebook.apk
adb -s HT9BYL904399 shell am start -n net.blogjava.mobile.ebook/net.blogjava.mobile.ebook.Main
其中Main是ebook.apk的主Activity。(记得输入包名前面是路径,后面还要再输入全称)相当于Windows应用程序的主窗体或Web应用程序的主页面。am是shell命令。
To get started, you’ll need to install OpenJDK or Oracle Java JDK. The OpenJDK version comes with Ubuntu and it’s very easy to install.
To install OpenJDK in Ubuntu, press Ctrl – Alt – T on your keyboard to open the terminal. When it opens, run the commands below to install OpenJDK packages.
Next, download Android SDK revision r_21.1 by running the commands below.
重新玩下这个。
adb devices 阶段
ddms配置阶段
在仅有apk情况下,可以使用如下命令行方式adb
1. 安装程序 adb install ebook.apk
2. 重安装程序 adb install -r ebook.apk
3. 卸载程序 adb uninstall net.blogjava.mobile.ebook
只卸载应用程序,保留缓冲和数据 adb uninstall -k net.blogjava.mobile.ebook
4. 指定具体机器
如果机器上有多个模拟器或真机实例,需要使用-s命令行参数指定具体的模拟器或真机。
5.直接运行程序。
A. 在emulator-5554模拟器上运行ebook.apk
adb -s emulator-5554 shell am start -n net.blogjava.mobile.ebook/net.blogjava.mobile.ebook.Main
B. 在真机上运行ebook.apk
adb -s HT9BYL904399 shell am start -n net.blogjava.mobile.ebook/net.blogjava.mobile.ebook.Main
其中Main是ebook.apk的主Activity。(记得输入包名前面是路径,后面还要再输入全称)相当于Windows应用程序的主窗体或Web应用程序的主页面。am是shell命令。
To get started, you’ll need to install OpenJDK or Oracle Java JDK. The OpenJDK version comes with Ubuntu and it’s very easy to install.
To install OpenJDK in Ubuntu, press Ctrl – Alt – T on your keyboard to open the terminal. When it opens, run the commands below to install OpenJDK packages.
sudo apt-get install openjdk-7-jre openjdk-7-jdk icedtea-7-plugin
Next, download Android SDK revision r_21.1 by running the commands below.
wget http://dl.google.com/android/android-sdk_r21.1-linux.tgz[/code]
Next, run the commands below to extract the downloaded file.tar -xvzf android-sdk_r21.1-linux.tgz
After extracting the file, change into the tools folder by running the commands belowcd android-sdk-linux/tools/
Next, run the commands below to launch android Android SDK Manager. The manager lets you install libraries and packages suitable for developing Android apps../android
When it opens, select all the packages you which to download and install. Make sure all packages are installed then close out.
相关文章推荐
- 【菜鸟学android开发】2-破处:My First App on Android
- Errors running builder 'Android Resource Manager' on project 'MyFirstApp'解决方案
- Mecca Miriam -----My first android app for Application
- My First Swift APP
- Android: Unable to execute dex: Multiple dex files define Lcom/myapp/R$array; 解决方案
- MY first android application
- Start my second app for android
- my first android test
- my first android test
- Cordova入门之FirstApp (Android)(二)
- My first qt app
- My Android 之旅瑞士军刀app开发(一)APP的产生和初步设计
- android真实项目教程(四)——MY APP MY STYLE_by_CJJ
- my first android test
- my first android test
- Android小程序(1)--Build Your First App(a)
- My first mobile web app
- my first android test
- com.example.firstservice.FirstService cannot be cast to android.app.Activity
- My First Android Development - FlappyAmusing