Dienstag, 25. Juli 2017

The 10 best PhoneGap tricks for beginners

These post waiting as a draft for 1 years ... i´ll just publish it now Deploy Early on Real Device - Deploy Automated on Real Device Seeing log Messages http://stackoverflow.com/questions/6854127/filter-logcat-to-get-only-the-messages-from-my-application-in-android adb -d logcat : *:S Deployment Strategie -Seperate web application Use Build tools. Use tools which automatically install dependencies, minimize your code, prepare builds and run tests Bower, Grunt and NPM should be in your standard. Webapp and Phonegap in different repositorys. Automate as much as Possible fast builds does mean fast feedback and fast feedback means you catch errors as early as possible. Deploy fast, use a device use a test player eq B BlueStack it is faster than the usual android emulator. www.bluestacks.com Use a good integrated IDE, we recommend Webstorm. Build your app locally. The remote Build via Phonegap.com is easy for your first up. Uploading each time to build costs a lot of time, local build makes it faster. How to do that ? Install Android SDK or Android Studio C:\Development\adt-bundle\sdk\platform-tools;C:\Development\adt-bundle\sdk\tools Install Gradle https://docs.gradle.org/current/userguide/installation.html set PATH ;%JAVA_HOME%\bin;%GRADLE_HOME%\bin Debugging adb logcat -c adb logcat kann man prima zusehen Problems with Angular $http.post This was my biggest problem cause it breaked the app completely it is a cors cross origin device problem cordova plugin add cordova-plugin-whitelist The Whitelist Plugin is required to avoid cross origin problems Build Tool Default is Gradle but for some reason Phonegap for me used ANT on remote but gradle for locale which caused some problems Use good console - original one is more verbose than intellijs [error] {"error":"Error index.html not found"} [error] Reason 1 HTML Error in index.html could cause this Reason 2 was orginated by existing /build/www directory which could not be deleted. rm -rf (ohh i got this shit linux commands on windows console) helped me to fix it . Wired solution remove and add plattforms

Keine Kommentare:

Kommentar veröffentlichen