Thought of trying phonegap today.
Installed Node.js
installed phonegap using command:
npm install -g phonegap
created app using
phonegap create my-app
running command
phonegap run android
got this error - Can not find script file "C:\res\windows\zip.js"
Not sure what's happening. I have tried downloading zip.js and placing inside www\js as well as build. Not sure why the error is referring to res folder while there isn't any.
Anyone faced similar situation ?
I was able to get rid of the error by updating Phonegap:
npm update -g phonegap
You can see Github issue with the same probmlem -> https://github.com/phonegap/phonegap-cli/issues/81
or here -> https://github.com/phonegap/phonegap-cli/issues/77
You should go to the app directory:
$ cd my-app/
$ phonegap build android
I had the same problem, and found a solution!
Solution:
Insure you've installed the Java JDK and Android SDK (I installed the Android SDK through Android Studio)
Install Cordova (core of PhoneGap). Because I'm not sure if you can run the cordova commands without installign cordova seperatly.
phonegap create my-app
, the PhoneGap CLI doesn't create a folder for the Android platform. Thus when running the command: phonegap run android
, the android platform is'nt present in the PhoneGap project. To solve this issue just run the following command: cordova platform add android
(in the my-app folder)phonegap local build android
, and the Android app will successfully compiled.Easier alternatives:
PhoneGap Build: It is a cloud-based service who removes the need for different SDKs to build the application for different platforms. It is a free service as long that your applications are open-source, or you limit your private apps to just one.
Develop the application with your beloved edittor/IDE and run the application with the Desktop app, who runs a local server connecting with the application which you can download at the application stores.
Just Build/run the application in the platforms' IDE. In case of Android, use Android studio to build en deploy the application on your device. (Open the platforms->Android project in your IDE)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With