Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Android Studio, http://developer.android.com/sdk/index.html Android Studio IDE Android SDK tools Android 6.0 (Marshmallow) Platform Android 6.0 emulator system image with Google APIs Installing Android Studio, http://developer.android.com/sdk/installing/index.html?pkg=studio Get Started – Building Your First App, http://developer.android.com/training/basics/firstapp/index.html Creating an Android Project, http://developer.android.com/training/basics/firstapp/creatingproject.html Android Studio Installation 1. Download, Android Studio for Windows 2. Install Android Studio (if old version is installed, it will help you to uninstall the old version IDE) Select components to install: Android Studio, Android SDK, Android Virtual Device, Performance (requires 4.3B) 3. Configuration Settings Android Studio Installation Location: C:\Program Files\Android\Android Studio 1 Android SDK Installation Location: C:\Users\Lin\AppData\Local\Android\sdk1 Emulator Setup – recommended 2 GB Choose Start Menu Folder: Android Studio 4. Error launching Android Studio The environment variable JAVA_HOME (with the value of C:\Program Files\Java\jre.8.0_60) does not point to a valid JVM installation. Solution: Java Runtime Environment Version 8.0 Update 66 – Nov. 23, 2015: C:\Program Files\Java\jre1.8.0_66 Computer => Properties => Advanced system settings => Environment Variables User variables for Lin => PATH System variables => New, then enter a new path JAVA_HOME C:\Program Files\Java\JDK1.8.0_60 5. Windows => All Programs => Android Studio => Android Studio Start “Downloading Components” Android SDK was installed to C:\Users\Lin\AppData\Local\Android\sdk1 … Installing Archives … Creating Android virtual device Android virtual device Nexus_5_API_23_x86 was successfully created 6. Welcome to Android Studio Recent Projects Quick Start Start a new Android Studio project Open an existing Android Studio project VCS: Check out project from Version Control Import project (Eclipse ADT, Gradle, etc) Import an Android code sample Configure Docs and How-Tos 7. Adding SDK Packages Configure => SDK Manager Download the latest SDK Platforms, SDK Tools; Enabled SDK Update Sites 8. Adding the support Libraries Android Wear, Android TV, Google Cast 9. Get Started – Building Your First App, http://developer.android.com/training/basics/firstapp/index.html Setup Your Environment 10. Create a Project with Android Studio – “Hello World app”, http://developer.android.com/training/basics/firstapp/creating-project.html Quick Start => Start a new Android Studio project Configure your new project Application name: My First App Company Domain: lin.example.com Project location: D:\565-2016-Spring-MobileComputing\0AndroidAppLab\MyFirstApp Target Android Devices Phone and Tablet: Minimum SDK API 15: Android 4.0.3 (IceCreamSandwitch) Add an activity to Mobile Select Blank Activity and click Next Customize the Activity => change the Activity Name to MyActivity LayoutName => activity_my Title => MyActivity Menu Resource Name => menu_my Click the Finish button to create the project MyFirstApp … now a “Hello World” app with the following default files XML layout file – app/src/main/res/layout/activity_my.xml Hellow world! Message with some settings – app/src/main/res/layout/content_my.xml app/src/main/java/com.mycompany.myfirstapp/MyActivity.java – containing Java Activity class which starts the activity and loads the layout that says “Hello World!” app/src/main/AndroidManifest.xml – describes the fundamental characteristics of the app and defines each of its component. App/build.gradle drawable-<density>/ layout/ menu/ mipmap/ values/ 11. Run Your Application, http://developer.android.com/training/basics/firstapp/running-app.html Run on a Real Device Setup your device Run the app from Android Studio Run the app from a command line Run on the Emulator