Cordova Commands

Published: 2019-08-04, Updated: 2018-01-15

Links

Pasta do apk

cordova build --release
./platforms/android/build/outputs/apk/android-release-unsigned.apk

Ver os logs do cordova

adb logcat | grep app=mi

Passos para configurar o ambiente para android

storeFile=C:/yourlocation/app.keystore
storeType=jks
keyAlias=aliasname
keyPassword=aliaspass
storePassword=password
para gerar um keystore
keytool -genkey -v -keystore mageddo.keystore -alias mageddo -keyalg RSA -keysize 2048 -validity 60000
cordova build android --release

Rodar app no browser para devlopment

$ npm install -g cordova
$ cordova create MyApp
$ cd MyApp
$ cordova platform add browser
$ cordova build --release browser

Gerar apk para android

$ cordova platform add android
$ cordova build --release android

Erro quando vai gerar o apk do android

erro

No installed build tools found. Please install the Android build tools

solução

android list sdk --all
android update sdk -u -a -t 19
android update sdk -u -a -t 20

Automatically accept all SDK licences

erro

You have not accepted the license agreements of the following SDK components:

soluçao

mkdir "$ANDROID_SDK/licenses" || true
echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_SDK/licenses/android-sdk-license"
echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_SDK/licenses/android-sdk-preview-license"

Buildar app react e rodar em device especifico

bash -c 'cd react && npm run build' && sed -i -E 's/"\/static/"static/g' www/index.html && cordova run android --target emulator-5556

ReactJs Examples ffmpeg Bookmarks

Comments