Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/karliatto/cordova-backbone-template
https://github.com/karliatto/cordova-backbone-template
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/karliatto/cordova-backbone-template
- Owner: karliatto
- License: mit
- Created: 2018-01-07T19:44:28.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-09-08T11:59:50.000Z (over 2 years ago)
- Last Synced: 2024-10-30T18:48:26.379Z (3 months ago)
- Language: HTML
- Size: 321 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cordova starting
## Java Development Kit
Create folder to host JDK
```bash
cd /usr/local
sudo mkdir java && cd java
sudo tar xzvf ~/Downloads/jdk-*****_***.tar.gz
# replace *** with the correct number that matches your directory path
```In order to have JAVA in path we have to add it to .bashrc file
```bash
cd ~
vim .bashrc
``````bash
export JAVA_HOME="/usr/local/java/jdk1.8.0_***"
PATH=$PATH:$JAVA_HOME/bin
``````bash
source .bashrc
javac -version
```
it should print the version of JAVA you havesource is a bash shell built-in command that executes the content of the file passed as argument, in the current shell. It has a synonym in . (period).
## Android Studio
Download from their website
```bash
cd /usr/local
sudo unzip ~/Downloads/android-studio-ide-***.zip
cd android-studio/bin
./studio.sh
```Now we should add Android to the path
```bash
cd ~
vim .bashrc
``````bash
export ANDROID_HOME="$HOME/Android/Sdk"
PATH=$PATH:$ANDROID_HOME/tools
PATH=$PATH:$ANDROID_HOME/platform-tools
```## Gradle
Install Gradle
```bash
sudo apt install gradle
```## Cordova
```bash
npm install -g cordova
```Now we have everything we need, we can create the project
## Create Cordova Project
```bash
cordova create myproject
cd myproject
```## Run the project
If you want to test it in the browser:
```bash
cordova platform add browser
cordova run browser
```If you want to run it with Android you should add the platform:
```bash
cordova platform add android
```
Then conect your android device with developer mode active or use an emulator from Android Studio and run:```bash
cordova run browser
```### Check if everything is OK
```bash
cordova requirements
```