FIRST OF ALL ionic info
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
Cordova Platforms : android 6.4.0 browser 5.0.3
Ionic Framework : ionic1 1.3.1
System:
ios-deploy : 1.9.2
ios-sim : 6.1.2
Node : v9.7.0
npm : 5.7.1
OS : macOS Sierra
Xcode : Xcode 7.3 Build version 7D175
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
HI im trying to build a release version for my app, when im trying to create the android platform (ionic cordova platform add android) i see that it only generates inside the res folder three things:
+ app/platforms/android/res/
- drawable-hdpi
- drawable-mdpi
- drawable-xhdpi
And the result in the console is:
cordova platform add android --save
Using cordova-fetch for cordova-android@~7.0.0
Adding android project
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.ionicframework.conservaapp671674
Name: Conserva.CO
Activity: MainActivity
Android target: android-26
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@7.0.0
Android Studio project detected
Android Studio project detected
Installing "cordova-plugin-camera" for android
Plugin dependency "cordova-plugin-compat@1.0.0" already fetched, using that version.
Installing "cordova-plugin-compat" for android
Dependent plugin "cordova-plugin-compat" already installed on android.
Installing "cordova-plugin-console" for android
Installing "cordova-plugin-device" for android
Installing "cordova-plugin-geolocation" for android
Plugin dependency "cordova-plugin-compat@1.0.0" already fetched, using that version.
Dependent plugin "cordova-plugin-compat" already installed on android.
Installing "cordova-plugin-image-picker" for android
Installing "cordova-plugin-splashscreen" for android
Failed to install 'cordova-plugin-splashscreen': Error: ENOENT: no such file or directory, open '/Users/Guillermo/Desktop/MITOKONDRIA/_conserva/0_tiendas/conserva-app_2_android/platforms/android/AndroidManifest.xml'
at Object.fs.openSync (fs.js:667:18)
at Object.fs.readFileSync (fs.js:572:33)
at Object.parseElementtreeSync (/Users/Guillermo/Desktop/MITOKONDRIA/_conserva/0_tiendas/conserva-app_2_android/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
at new AndroidManifest (/Users/Guillermo/Desktop/MITOKONDRIA/_conserva/0_tiendas/conserva-app_2_android/platforms/android/cordova/lib/AndroidManifest.js:29:20)
at AndroidProject.getPackageName (/Users/Guillermo/Desktop/MITOKONDRIA/_conserva/0_tiendas/conserva-app_2_android/platforms/android/cordova/lib/AndroidProject.js:99:12)
at Api.addPlugin (/Users/Guillermo/Desktop/MITOKONDRIA/_conserva/0_tiendas/conserva-app_2_android/platforms/android/cordova/Api.js:223:57)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:594:10)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:357:28
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
(node:2108) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/Guillermo/Desktop/MITOKONDRIA/_conserva/0_tiendas/conserva-app_2_android/platforms/android/AndroidManifest.xml'
at Object.fs.openSync (fs.js:667:18)
at Object.fs.readFileSync (fs.js:572:33)
at Object.parseElementtreeSync (/Users/Guillermo/Desktop/MITOKONDRIA/_conserva/0_tiendas/conserva-app_2_android/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
at new AndroidManifest (/Users/Guillermo/Desktop/MITOKONDRIA/_conserva/0_tiendas/conserva-app_2_android/platforms/android/cordova/lib/AndroidManifest.js:29:20)
at AndroidProject.getPackageName (/Users/Guillermo/Desktop/MITOKONDRIA/_conserva/0_tiendas/conserva-app_2_android/platforms/android/cordova/lib/AndroidProject.js:99:12)
at Api.addPlugin (/Users/Guillermo/Desktop/MITOKONDRIA/_conserva/0_tiendas/conserva-app_2_android/platforms/android/cordova/Api.js:223:57)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:594:10)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:357:28
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
(node:2108) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2108) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
SO I CHANGE IT TO:
ionic cordova platform add android@6.4.0 and it CORRECTLY generate the res folder completely, BUT when i try to release a version i got the following error:
ionic cordova platform add android@6.4.0
cordova platform add android@6.4.0 --save
Using cordova-fetch for cordova-android@6.4.0
Adding android project
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.ionicframework.conservaapp671674
Name: Conserva.CO
Activity: MainActivity
Android target: android-26
Subproject Path: CordovaLib
Android project created with cordova-android@6.4.0
Installing "cordova-plugin-camera" for android
Plugin dependency "cordova-plugin-compat@1.0.0" already fetched, using that version.
Installing "cordova-plugin-compat" for android
Dependent plugin "cordova-plugin-compat" already installed on android.
Installing "cordova-plugin-console" for android
Installing "cordova-plugin-device" for android
Installing "cordova-plugin-geolocation" for android
Plugin dependency "cordova-plugin-compat@1.0.0" already fetched, using that version.
Dependent plugin "cordova-plugin-compat" already installed on android.
Installing "cordova-plugin-image-picker" for android
Installing "cordova-plugin-splashscreen" for android
Installing "cordova-plugin-statusbar" for android
Installing "cordova-plugin-whitelist" for android
This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
Installing "cordova-sqlite-storage" for android
installing external dependencies via npm
npm install of external dependencies ok
Installing "ionic-plugin-keyboard" for android
Running command: /Users/Guillermo/Desktop/MITOKONDRIA/_conserva/0_tiendas/conserva-app_2_android/hooks/after_prepare/010_add_platform_class.js /Users/Guillermo/Desktop/MITOKONDRIA/_conserva/0_tiendas/conserva-app_2_android
save flag or autosave detected
**Saving android@~6.4.0 into config.xml file**
THEN: ionic cordova build android@6.4.0 --release
[WARN] Not performing Ionic build for project type: ionic1.
> cordova build android@6.4.0 --release
(node:2387) UnhandledPromiseRejectionWarning: Error: The platform "android@6.4.0" does not appear to have been added to this project.
at Object.getPlatformApi (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/platforms/platforms.js:46:15)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:54:38
at Array.map (<anonymous>)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:52:47
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:557:44
at flush (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:108:17)
at process._tickCallback (internal/process/next_tick.js:112:11)
(node:2387) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2387) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
HELP PLEASE!!!