Android Training/Creating an Android Project/en: Unterschied zwischen den Versionen

Übernehme Bearbeitung einer neuen Version der Quellseite
(Neue Version von externer Quelle importiert)
 
(Übernehme Bearbeitung einer neuen Version der Quellseite)
Zeile 51: Zeile 51:
# Change directories into the Android SDK’s <code>sdk/</code> path.
# Change directories into the Android SDK’s <code>sdk/</code> path.
# Execute:  
# Execute:  
:: <code>tools/android list targets</code>
#: <code>tools/android list targets</code>
:: This prints a list of the available Android platforms that you’ve downloaded for your SDK. Find the platform against which you want to compile your app. Make a note of the target ID. We recommend that you select the highest version possible. You can still build your app to support older versions, but setting the build target to the latest version allows you to optimize your app for the latest devices.  If you don't see any targets listed, you need to install some using the Android SDK Manager tool. See [http://developer.android.com/sdk/installing/adding-packages.html Adding SDK Packages].
#: This prints a list of the available Android platforms that you’ve downloaded for your SDK. Find the platform against which you want to compile your app. Make a note of the target ID. We recommend that you select the highest version possible. You can still build your app to support older versions, but setting the build target to the latest version allows you to optimize your app for the latest devices.  If you don't see any targets listed, you need to install some using the Android SDK Manager tool. See [http://developer.android.com/sdk/installing/adding-packages.html Adding SDK Packages].
# Execute:
# Execute:
:: <code>android create project --target <target-id> --name MyFirstApp \ --path <path-to-workspace>/MyFirstApp --activity MyActivity \ --package com.example.myfirstapp</code>
#: <code>android create project --target <target-id> --name MyFirstApp \ --path <path-to-workspace>/MyFirstApp --activity MyActivity \ --package com.example.myfirstapp</code>
:: Replace <code><target-id></code> with an ID from the list of targets (from the previous step) and replace <code><path-to-workspace></code> with the location in which you want to save your Android projects.
#: Replace <code><target-id></code> with an ID from the list of targets (from the previous step) and replace <code><path-to-workspace></code> with the location in which you want to save your Android projects.
'''Tip:''' Add the <code>platform-tools/</code> as well as the <code>tools/</code> directory to your <code>PATH</code> environment variable.
'''Tip:''' Add the <code>platform-tools/</code> as well as the <code>tools/</code> directory to your <code>PATH</code> environment variable.


372

Bearbeitungen