Benutzer-Werkzeuge

Webseiten-Werkzeuge


app_programmierung

Dies ist eine alte Version des Dokuments!


APP Programmierung

Linux

  • 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

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

  1. Eclipse starten
  2. File > New > Project > Android Application Project > Next < Application Name: ErstePhonegapApp > Next > Next > Next > Next > Finish
  3. AndroidManifest.xml vom Verzeichnis vorlage in das Verzeichnis "projektname" kopieren und Projektname anpassen
  4. Verzeichnis assets vom Verzeichnis vorlage in das Verzeichnis "projektname" kopieren
  5. MainActivity.jar vom Verzeichnis vorlage in das Verzeichnis src/com.example.projektname kopieren und Projektname anpassen
  6. cordova-2.5.0.jar vom Verzeichnis vorlage in das Verzeichnis libs kopieren
  7. ggf re. Maus auf libs > Build Path > Configure Build Path > Libraries > Add external JARS > cordova-2.5.0.jar > OK
  8. Ordner xml von der Vorlage in das Verzeichnis res/ kopieren

AndroidManifest.xml

 <uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="16" />
      

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…”)

Phonegap Beispiele

app_programmierung.1365972905.txt.gz · Zuletzt geändert: 2013/04/14 22:55 von admin