$ ionic cordova run android
Running app-scripts build: --address 0.0.0.0 --port 8100 --p 8100 --livereload-port 35729 --r 35729 --iscordovaserve --externalIpRequired --nobrowser
[14:07:26] build dev started ...
<blockquote>...</blockquote>
BUILD SUCCESSFUL
Total time: 2.114 secs
Built the following apk(s):
/Users/vitali/Desktop/projects/test/platforms/android/build/outputs/apk/android-debug.apk
ANDROID_HOME=/Users/vitali/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
No target specified, deploying to device 'ACE215CFDE5A'.
Skipping build...
Built the following apk(s):
/Users/vitali/Desktop/projects/test/platforms/android/build/outputs/apk/android-debug.apk
Using apk: /Users/vitali/Desktop/projects/test/platforms/android/build/outputs/apk/android-debug.apk
Package name: io.ionic.starter
Error: Failed to install apk to device: [ 1%] /data/local/tmp/android-debug.apk
<blockquote>...</blockquote>
[100%] /data/local/tmp/android-debug.apk
/Users/vitali/Desktop/projects/test/platforms/android/build/outputs/apk/android-debug.apk: 1 file pushed. 2.3 MB/s (4078111 bytes in 1.659s)
pkg: /data/local/tmp/android-debug.apk
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
rm failed for -f, No such file or directory
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova run android (exit code 1).
$ ionic cordova run android --prod --release
Running app-scripts build: --prod --address 0.0.0.0 --port 8100 --p 8100 --livereload-port 35729 --r 35729 --iscordovaserve --externalIpRequired --nobrowser
[14:09:05] build prod started ...
<blockquote>...</blockquote>
BUILD SUCCESSFUL
Total time: 2.893 secs
Built the following apk(s):
/Users/vitali/Desktop/projects/test/platforms/android/build/outputs/apk/android-release-unsigned.apk
ANDROID_HOME=/Users/vitali/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
No target specified, deploying to device 'ACE215CFDE5A'.
Skipping build...
Built the following apk(s):
/Users/vitali/Desktop/projects/test/platforms/android/build/outputs/apk/android-release-unsigned.apk
Using apk: /Users/vitali/Desktop/projects/test/platforms/android/build/outputs/apk/android-release-unsigned.apk
Package name: io.ionic.starter
Error: Failed to install apk to device: [ 2%] /data/local/tmp/android-release-unsigned.apk
<blockquote>...</blockquote>
[100%] /data/local/tmp/android-release-unsigned.apk
/Users/vitali/Desktop/projects/test/platforms/android/build/outputs/apk/android-release-unsigned.apk: 1 file pushed. 4.5 MB/s (2187312 bytes in 0.460s)
pkg: /data/local/tmp/android-release-unsigned.apk
Failure [INSTALL_FAILED_OLDER_SDK]
rm failed for -f, No such file or directory
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova run android --release (exit code
1).
$ ionic cordova run ios
Running app-scripts build: --address 0.0.0.0 --port 8100 --p 8100 --livereload-port 35729 --r 35729 --iscordovaserve --externalIpRequired --nobrowser
[16:27:21] build dev started ...
<blockquote>...</blockquote>
** BUILD SUCCEEDED **
Error: Cannot read property 'replace' of undefined
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova run ios (exit code 1).
release.sh
.ionic repair
.#!/usr/bin/env bash
# Если не работает, проверь слэши и прочее. Зависит от консоли, в которой запускаешь. Например гитовая требует слэши /, а не \
# Билд приложения
ionic cordova build android --prod --release &&
# Переход к собранному приложению
cd platforms/android/app/build/outputs/apk/release &&
# Подпись приложения с помощью личного секретного ключа
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -storepass ТВОЙ_ПАРОЛЬ_ОТ_КЛЮЧА -keypass ТВОЙ_ВТОРОЙ_ПАРОЛЬ_ОТ_КЛЮЧА -keystore C:/ТВОЙ_ПУТЬ_К_КЛЮЧУ/НАЗВАНИЕ_КЛЮЧА.jks app-release-unsigned.apk key &&
# Удаление прошлой сборки для релиза
rm -f НАЗВАНИЕ_ПРИЛОЖЕНИЯ.apk &&
# Оптимизация APK, обязательно перед загрузкой в play market
zipalign -v 4 app-release-unsigned.apk НАЗВАНИЕ_ПРИЛОЖЕНИЯ.apk