Skip to content

Instantly share code, notes, and snippets.

@cyberzilla
Created January 22, 2018 02:14
Show Gist options
  • Save cyberzilla/eca255195681351be5eaf2baf1083b2b to your computer and use it in GitHub Desktop.
Save cyberzilla/eca255195681351be5eaf2baf1083b2b to your computer and use it in GitHub Desktop.
Documentation cordova
Documentation Cordova:
1. Create Project
cordova create [project_name] [app_name] [app_title]
Exp: cordova create prjFirst com.sevennett.latihansatu "Latihan Satu"
2. Add Platform
inside into [your_app_directory] and add platform android
Exp: cd prjFirst && cordova platform add android
3. Add/Remove Plugin Cordova:
Add:
cordova plugin add cordova-plugin-camera //exp
Remove:
cordova plugin rm cordova-plugin-camera
4. Run Project Into Emulator
Run Your Emulator
and type into terminal:
cordova emulate android
Untuk menjalankan di browser:
cordova serve
5. Build Apk:
cordova build --release
6. Untuk Mensigned APK
masuk ke directory project anda di your_project/platforms/android/app/build/outputs/apk/release/
akan ada file "app-release-unsigned.apk"
masih di directory yang sama buat keystore dengan mengetikkan
keytool -genkey -v -keystore [yourkey.keystore] -alias [youralias] -keyalg RSA -validity 10000
*[yourkey.keystore] dan [youralias] silahkan ganti sesuai dengan keinginan anda, tidak pake []
*Silahkan masukkan password dan informasi keystore yang diminta Misal:
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: Your Name
What is the name of your organizational unit?
[Unknown]: Your Organization Unit
What is the name of your organization?
[Unknown]: Your Organization
What is the name of your City or Locality?
[Unknown]: Your City
What is the name of your State or Province?
[Unknown]: Your State
What is the two-letter country code for this unit?
[Unknown]: 62
press: yes
*Kemudian Masukkan lagi Passwordnya
*Kemudian Signed Jarnya dengan mengetikkan:
jarsigner -verbose -keystore <path of my-keystore.keystore> <path of apk> alias_name
contoh dari kasus yang tadi:
jarsigner -verbose -keystore yourkey.keystore app-release-unsigned.apk youralias
Kemudian Zipalign dengan mengetikkan:
zipalign -f -v 4 app-release-unsigned.apk signed.apk
7. Done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment