So, I get this error when using ionic cordova build release android
This is my ionic info
cli packages: (C:\Users\matt_\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0
Ionic Framework : ionic-angular 3.9.2
System:
Node : v8.9.4
npm : 5.6.0
OS : Windows 10
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
and this is my ionic cordova requirements
> cordova requirements
Android Studio project detected
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed
Please install Android target / API level: "android-26".
Hint: Open the SDK manager by running: "C:\Users\matt_\AppData\Local\Android\Sdk\tools\android.bat"
You will require:
1. "SDK Platform" for API level android-26
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-4.1\bin\gradle
(node:4072) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Some of requirements check failed
(node:4072) [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.
> cordova platform add release --save
Using cordova-fetch for release@3.1.7
Adding release project...
Unable to load PlatformApi from platform. Error: Cannot find module 'C:\Users\matt_\OneDrive\Documents\MobileProjects\Ionic\ProjectInside\node_modules\release'
(node:11004) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Unhandled "error" event. (The platform "release" does not appear to be a valid cordova platform. It is missing API.js. release not supported.)
(node:11004) [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.
Running app-scripts build: --platform release --target cordova
[21:50:59] build dev started ...
[21:50:59] clean started ...
[21:50:59] clean finished in 28 ms
[21:50:59] copy started ...
[21:50:59] deeplinks started ...
[21:50:59] deeplinks finished in 43 ms
[21:50:59] transpile started ...
[21:51:03] transpile finished in 3.94 s
[21:51:03] preprocess started ...
[21:51:03] preprocess finished in less than 1 ms
[21:51:03] webpack started ...
[21:51:03] copy finished in 4.21 s
[21:51:10] webpack finished in 6.89 s
[21:51:10] sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[21:51:12] sass finished in 1.34 s
[21:51:12] postprocess started ...
[21:51:12] postprocess finished in 15 ms
[21:51:12] lint started ...
[21:51:12] build dev finished in 12.70 s
> cordova build release android
(node:10532) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: The platform "release" does not appear to have been added to this project.
(node:10532) [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.
[21:51:16] lint finished in 4.40 s