app_programmierung
Inhaltsverzeichnis
APP Programmierung
Android Studio
Internet
Linux
Eclipse
File > New > Android Application Project > Application Name: > Finish Application Name/src/com.example.applicationname/MainActivity.java anpassen www.zip im Ordner assets entpacken cordova-2.5.0.jar in den Ordner Application Name/libs Re. Maus auf den Ordner libs > Build Path > Configue Build Path > Libraries > Add external JARs... > cordova-2.5.0.jar > OK cordova-2.5.0.jav markieren > Edit > Pfad an Application Name/libs/ anpassen Application Name/AndroidManifest.xml anpassen Vorlagen und Dateien gibt es unter cloud.peer.st/apps/vorlagen
apk auf Handy installieren
Einstellungen > Sicherheit > Unbekannte Quellen [x]
- Problem: Android Emulator stürzt nach dem Start ab. Fehlermeldung: emulator-arm: munmap_chunk(): invalid pointer:
- Lösung: Bei Knoppix fehlt die Datei /usr/share/zoneinfo/localtime
ln -sf /usr/share/zoneinfo/posix/Europe/Vienna /usr/share/zoneinfo/localtime
- Eclipse starten
- File > New > Android Application > Application Name: ErstePhoneGapApp > Next > Next > Next > Blank Aktivity > Next > Finish
APK installieren
- Handy
- Einstellungen > Sicherheit > Unbekannte Quellen [x] zulassen
- apk auf das handy kopieren
- Mit App "Eigene Dateien" zur APK-Datei navigieren und auswählen → Installation
Problem: # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007ffd98b50870, pid=20546, tid=14072763817344 Lösung: -XX:-UseCompressedOops in der eclipse.ini hinzufügen
Neue Android App mit PhoneGap erstellen
- Eclipse starten
- File > New > Android Application Project > Application Name: ErstePhonegapApp > Next > Next > Next > Next > Finish
- Dolphin starten > Ordner: casper-rw > workspace > vorlage
- AndroidManifest.xml vom Verzeichnis vorlage in das Verzeichnis "ErstePhonegapApp" kopieren und Application Name in der 3. Zeile anpassen > re. Maustaste > Open with > Text Editor (com.example.erstephonegapapp) > speichern
- Verzeichnis assets vom Verzeichnis vorlage in das Verzeichnis "ErstePhonegapApp" kopieren
- MainActivity.java vom Verzeichnis vorlage in das Verzeichnis src/com.example.erstephonegapapp kopieren und Projektname anpassen > re. Maustaste > Open with > Text Editor > (com.example.erstephonegapapp) > Fehlermeldungen ignorieren
- cordova-2.5.0.jar vom Verzeichnis vorlage/libs in das Verzeichnis libs kopieren
- ggf re. Maus auf libs > Build Path > Configure Build Path > Libraries > Add JARS > ErstePhoneGapApp > libs > cordova-2.5.0.jar > OK > OK
- Ordner xml vom Verzeichnis vorlage in das Verzeichnis res/ kopieren
AVD Android Virtual Device
~sdk/tools/android avd
Problem: Eclipse Android Unexpected Error While Launching Logcat
In Eclipse starting up the Android emulator the LogCat does not always detect it. In the console you can read the following error:
Unexpected error while launching logcat. Try reselcting the device.] device not found
To solve this. Go to the DDMS perspective
Menu → Window → Open Perspective → DDMS (or find it in “Other…”)
app_programmierung.txt · Zuletzt geändert: von admin
