Code Monkey home page Code Monkey logo

phonegap-box's Introduction

phonegap-box

A vagrant box provisioned with the phonegap development environment for the android platform. All you have to do is to clone the repository, fire vagrant up and add your android device to VirtualBox. After that you are ready to begin your phonegap project.

Installation

1) Download and install the box

  1. install vagrant http://docs.vagrantup.com/v2/installation/index.html
  2. run git clone [email protected]:vasconcelloslf/phonegap-box.git
  3. run cd phonegap-box
  4. run vagrant up

Note for Windows hosts:

If you're using Windows as a host, then you will have problems trying to use the shared folder to store projects. VirtualBox, NTFS, and symlinks don't work well together. To get around this issue:

  1. Open the Vagrantfile and uncomment the line under the comment "Enable symlinks in Windows."
  2. Open secpol.msc and navigate to Security Settings > Local Policies > User Rights Assignment
  3. Open the Create Symbolic Links and add the Administrators group if it isn't already there.
  4. Open your command prompt with Run as administrator
  5. Run vagrant up to create and initialize the virtual machine
  6. Run vagrant ssh to connect and work in the machine as usual.

You must use the elevated command prompt to work with the machine. Running vagrant up from a non-elevated command prompt causes the machine to be unable to sync the share and see items created from the Windows side.

2) Configure your device on the box

The box doesn't have an UI, so there is no emulator, you can only install on the device. In order to do so, you need to configure the VirtualBox to see your device through a USB port:

  1. Plug the device
  2. VirtualBox -> phonegap-box -> Settings -> Ports -> USB -> Add Filter -> (Select your android device)
  3. (your device) Settings -> Developer Options -> USB Debugging (remark if it alreday marked)
  4. (your device) A prompt to allow the virtual machine will appear. Click ok.
  5. Plug and unplug the USB device.
  6. (vagrant) run adb devices. You now should see your device on the list.

In order to resolve the ?????? no permissions problem:

  • sudo -s
  • adb kill-server
  • adb start-server
  • adb devices

3) Create and run your phonegap project

  1. run vagrant ssh
  2. run cd /vagrant
  3. run phonegap create folder-name -n ProjectName
  4. run cd folder-name
  5. run phonegap run android

That's it.

About

This box will install and configure the following:

  • Vim
  • Git
  • Node.js
  • Npm
  • Java JRE
  • Java SDK
  • Android ADT

phonegap-box's People

Contributors

parsonsmatt avatar

Watchers

Hamilton C. Neto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.