Zum Inhalt springen

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

keine Bearbeitungszusammenfassung
(hab den Teil in der Diskussion nicht gesehen, sorry -.-)
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
An Android project contains all the files that comprise the source code for your Android app. The Android SDK tools make it easy to start a new Android project with a set of default project directories and files.
Ein Android-Projekt enthält alle Dateien aus dem der Quellcode Deiner Android App besteht. Die Android-SDK-Tools machen es einfach ein neues Android-Projekt mit einer Reihe von Standardverzeichnissen und -dateien zu starten.


This lesson shows how to create a new project either using Eclipse (with the ADT plugin) or using the SDK tools from a command line.
Diese Lektion zeigt wie ein neues Projekt entweder mit Eclipse (mit ADT Plugin) oder mit den SDK-Tooks per Kommandozeile erzeugt wird.


'''Note:''' You should already have the Android SDK installed, and if you're using Eclipse, you should have installed the [http://developer.android.com/tools/sdk/eclipse-adt.html ADT plugin] as well. If you have not installed these, see [http://developer.android.com/sdk/installing/index.html Installing the Android SDK] and return here when you've completed the installation.
'''Hinweis:''' Du solltest das Android SDK bereits installiert haben und wenn Du Eclipse benutzt solltest Du auch das [http://developer.android.com/tools/sdk/eclipse-adt.html ADT Plugin] installiert haben. Wenn Du diese noch nicht installiert haben, siehe [http://developer.android.com/sdk/installing/index.html Installing the Android SDK] und komm hierher zurück wenn Du die Installation abgeschlossen hast.


== Create a Project with Eclipse ==
== Erstellen eines Projektes mit Eclipse ==
[[Datei:Adt-firstapp-setup.png|thumb|The new project wizard in Eclipse.]]
[[Datei:Adt-firstapp-setup.png|thumb|Der neue Projektassistent in Eclipse.]]
# In Eclipse, select '''File > New > Project'''. The resulting dialog should have a folder labeled Android. (If you don’t see the Android folder, then you have not installed the ADT plugin – see [http://developer.android.com/tools/sdk/eclipse-adt.html#installing Installing the ADT Plugin]).
# Wähle '''File > New > Project''' in Eclipse. Der folgende Dialog sollte einen Ordner namens Android enthalten. (Wenn Du keinen Android-Ordner siehst, dann hast Du das ADT Plugin nicht installiert - siehe [http://developer.android.com/tools/sdk/eclipse-adt.html#installing Installing the ADT Plugin]).
# Open the Android folder, select Android Project and click '''Next'''.
# Öffne den Android-Ordner, wähle '''Android Project''' und klicke auf '''Next'''.
# Enter a project name (such as "MyFirstApp") and click '''Next'''.
# Gib einen Projektnamen (zum Beispiel ''MyFirstApp'') ein und klicke auf '''Next'''.
# Select a build target. This is the platform version against which you will compile your app.<br />We recommend that you select the latest version possible. You can still build your app to support older versions, but setting the build target to the latest version allows you to easily optimize your app for a great user experience on the latest Android-powered devices.<br />If you don't see any built targets listed, you need to install some using the Android SDK Manager tool. See [http://developer.android.com/sdk/installing/index.html#AddingComponents step 4 in the installing guide].<br />Click '''Next'''.
# Wähle ein Build-Target. Dies ist die Plattform-Version gegen die Du deine App kompilieren wirst.<br />Wir empfehlen die aktuellste verfügbare Version auszuwählen. Du kannst deine App trotzdem für ältere Versionen entwickeln, aber das Setzen des Build-Targets auf die aktuellste Version erlaubt Dir Deine App einfach für eine großartige Benutzererfahrung auf den neuesten Android-Geräten zu optimieren.<br />Wenn Du keine Build-Targets aufgelistet siehst, musst Du ein paar mit dem Android SDK Manager installieren. Siehe [http://developer.android.com/sdk/installing/index.html#AddingComponents step 4 in the installing guide].<br />Klicke auf '''Next'''.
# Specify other app details, such as the:
# Gib weitere App-Details an wie:
#; Application Name : The app name that appears to the user. Enter "My First App".
#; Application Name : der App-Name der dem Benutzer angezeigt wird. Gib '''My First App''' ein.
#; Package Name : The package namespace for your app (following the same rules as packages in the Java programming language). Your package name must be unique across all packages installed on the Android system. For this reason, it's important that you use a standard domain-style package name that’s appropriate to your company or publisher entity. For your first app, you can use something like "com.example.myapp." However, you cannot publish your app using the "com.example" namespace.
#; Package Name : Der Paket-Namensraum für deine App (folgend der gleichen Regeln wie bei Paketen in der Programmiersprache Java). Dein Paketname muss einzigartig innerhalb aller auf dem Android-System installierten Pakete sein. Deshalb ist es wichtig das Du einen standardisierten Domänen-artigen Paketnamen wählst, welcher der Identität Deines Unternehmens oder Deines Herausgebers entspricht. Für Deine erste App kannst Du so etwas wie '''com.example.myapp.''' verwenden. Jedoch kannst Deine App nicht mit dem Namensraum '''com.example''' veröffentlichen.
#; Create Activity : This is the class name for the primary user activity in your app (an activity represents a single screen in your app). Enter "MyFirstActivity".
#; Create Activity : Dies ist der Klassenname für die primäre Activity in Deiner App (eine Activity stellt einen Bildschirm in deiner App dar). Gib '''MyFirstActivity''' ein.
#; Minimum SDK : Select ''4 (Android 1.6)''.<br />Because this version is lower than the build target selected for the app, a warning appears, but that's alright. You simply need to be sure that you don't use any APIs that require an [http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels API level] greater than the minimum SDK version without first using some code to verify the device's system version (you'll see this in some other classes).
#; Minimum SDK : Wähle ''4 (Android 1.6)''.<br />Weil diese Version niedriger ist als das für die App gewählte Build-Target, erscheint eine Warnung, aber das ist in Ordnung. Du musst nur sicherstellen das du keine APIs benutzt welche ein [http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels API level] über der minimalen SDK Version erfordern, ohne vorher Quellcode zu verwenden um die Systemversion des Gerätes zu ermitteln (Du wirst das in anderen Trainings sehen).
: Click '''Finish'''.
: Klicke '''Finish'''.


Your Android project is now set up with some default files and you’re ready to begin building the app. Continue to the [[Android Training/ Deine App starten|next lesson]].
Dein Android-Projekt ist jetzt mit einigen Standarddateien erzeugt und du kannst anfangen die App zu entwickeln. Fahre mit der [[Android Training/ Deine App starten|nächsten Lektion]] fort.


== Erstellen eines Projektes mittels der Kommandozeilenwerkzeuge ==
== Erstellen eines Projektes mittels der Kommandozeilenwerkzeuge ==
11.008

Bearbeitungen

Cookies helfen uns bei der Bereitstellung von Android Wiki. Durch die Nutzung von Android Wiki erklärst du dich damit einverstanden, dass wir Cookies speichern.