No Cordova platforms listed in config.xml

ionic upload

used to work; now it is giving:

No Cordova platforms listed in config.xml. Nothing to prepare.

You can save your installed platforms to config.xml with the ionic cordova platform save command.

Running that save command has no effect

Any ideas?

1 Like

Post your ionic info output please.
Post your config.xml please.

Thanks.

ionic info as follows:

cli packages: (C:\Users\JC\AppData\Roaming\npm\node_modules)
    @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2
global packages:
    Cordova CLI : 7.0.1
local packages:
    @ionic/app-scripts : 2.1.3
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.6.0
System:
    Android SDK Tools : 25.2.5
    Node              : v6.11.1
    npm               : 3.10.10 
    OS                : Windows 7

config.xml as follows:

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>MyApp</name>
    <description>An awesome Ionic/Cordova app.</description>
    <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
    <content src="index.html" />
    <access origin="*" />
    <allow-navigation href="http://ionic.local/*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
    <platform name="android">
        <allow-intent href="market:*" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
    </platform>
    <engine name="android" spec="^6.2.3" />
    <plugin name="cordova-plugin-console" spec="1.0.5" />
    <plugin name="cordova-plugin-device" spec="1.1.4" />
    <plugin name="cordova-plugin-geolocation" spec="^2.4.3" />
    <plugin name="cordova-plugin-splashscreen" spec="~4.0.1" />
    <plugin name="cordova-plugin-statusbar" spec="2.2.2" />
    <plugin name="cordova-plugin-whitelist" spec="1.3.1" />
    <plugin name="ionic-plugin-deploy" spec="^0.6.7" />
    <plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
</widget>

Thanks
JC

This is strange. Ionic recognizes the platform, and it is definitely listed in there.

Can you run ionic cordova platform list and cordova platform list please?

Then also ionic upload --verbose and post the complete output please.

I’m having the same issue as well. Ionic tries to add my iOS platform every time I run ionic cordova build ios.

If this provides any help, I began receiving this message after installing the Firebase Analytics Native Plugin.

Here’s my output after running ionic cordova build ios:

$ ionic cordova build ios
> cordova platform add ios --save
✖ Running command - failed!
[WARN] Platform already added. Saving platforms to config.xml.
> cordova platform save
✔ Running command - done!
[WARN] Detected @ionic/cli-plugin-cordova in your package.json.

       As of CLI 3.8, it is no longer needed. You can uninstall it:
       
       npm uninstall --save-dev --save-exact @ionic/cli-plugin-cordova
       
[WARN] Detected @ionic/cli-plugin-ionic-angular in your package.json.

       As of CLI 3.8, it is no longer needed. You can uninstall it:
       
       npm uninstall --save-dev --save-exact @ionic/cli-plugin-ionic-angular
       
[INFO] Running app-scripts build: --platform ios --target cordova
       
[12:05:58]  build dev started ... 
[12:05:58]  clean started ... 
[12:05:58]  clean finished in 5 ms 
[12:05:58]  copy started ... 
[12:05:58]  transpile started ... 
[12:06:03]  transpile finished in 4.83 s 
[12:06:03]  preprocess started ... 
[12:06:03]  deeplinks started ... 
[12:06:03]  deeplinks finished in 203 ms 
[12:06:03]  preprocess finished in 204 ms 
[12:06:03]  webpack started ... 
[12:06:03]  copy finished in 5.22 s 
[12:06:21]  webpack finished in 18.32 s 
[12:06:21]  sass started ... 
[12:06:23]  sass finished in 1.47 s 
[12:06:23]  postprocess started ... 
[12:06:23]  removed unused font files 
[12:06:23]  postprocess finished in 8 ms 
[12:06:23]  lint started ... 
[12:06:23]  build dev finished in 24.88 s 
> ionic cordova prepare
[WARN] No Cordova platforms listed in config.xml. Nothing to prepare.

       You can save your installed platforms to config.xml with the ionic 
       cordova platform save command.
[12:06:25]  lint finished in 2.49 s

Thanks a bunch.

2 Likes

Interesting.

Can you post the same things I asked for?

Run this with --verbose please.
Then cordova build ios --debug.
Then cordova prepare --debug.

(Lot of commands, but we have to collect some data what is going on here)

In fact, I finally got it to work. This is what I did:

ionic cordova platform rm ios
ionic cordova plugin rm phonegap-plugin-push
ionic cordova plugin rm cordova-plugin-firebase-analytics
sudo gem install cocoapods
pod setup
ionic cordova plugin add phonegap-plugin-push --variable SENDER_ID="XXXXXXX
ionic cordova platform add ios

I don’t know if @jcsubmit had the same issue with Firebase Analytics and the Push Plugin, but I hope this helps someone out there. For your reference:

cli packages:

    @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2

global packages:

    Cordova CLI : 7.0.1 

local packages:

    @ionic/app-scripts : 1.3.7
    Cordova Platforms  : android 6.2.3 ios 4.4.0
    Ionic Framework    : ionic-angular 3.2.1

System:

    Android SDK Tools : 26.0.1
    ios-deploy        : 1.9.1 
    Node              : v8.1.2
    npm               : 5.3.0 
    OS                : macOS Sierra
    Xcode             : Xcode 8.3.3 Build version 8E3004b
<?xml version='1.0' encoding='utf-8'?>
<widget id="XXXXXX" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>XXXXXX</name>
    <description>XXXXXX</description>
    <author email="XXXXXX" href="">XXXXXX</author>
    <content original-src="index.html" src="XXXXXX" />
    <access origin="*" />
    <access origin="*" />
    <access origin="https://*.google-analytics.com" />
    <access origin="https://*.googleapis.com" />
    <access origin="https://*.firebaseio.com" />
    <access origin="https://*.herokuapp.com" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <allow-navigation href="http://ionic.local/*" />
    <allow-navigation href="https://twinemail.herokuapp.com/*" />
    <allow-navigation href="http://192.168.1.254:8100" />
    <allow-navigation href="http://100.71.126.46:8100" />
    <allow-navigation href="http://169.254.231.144:8100" />
    <allow-navigation href="http://172.19.131.79:8100" />
    <allow-navigation href="http://192.168.0.139:8100" />
    <allow-navigation href="http://192.168.0.139:8101" />
    <allow-navigation href="http://172.20.10.2:8100" />
    <allow-navigation href="http://172.20.10.4:8100" />
    <allow-navigation href="http://192.168.0.112:8100" />
    <allow-navigation href="http://ionic.local/*" />
    <allow-navigation href="http://10.60.3.191:8100" />
    <allow-navigation href="http://172.23.54.141:8100" />
    <allow-navigation href="http://10.42.22.7:8100" />
    <allow-navigation href="http://192.168.0.147:8100" />
    <allow-navigation href="http://192.168.1.164:8100" />
    <allow-navigation href="http://172.23.35.226:8100" />
    <allow-navigation href="http://10.60.6.81:8100" />
    <allow-navigation href="http://172.20.10.3:8100" />
    <allow-navigation href="http://172.23.35.201:8100" />
    <allow-navigation href="http://192.168.1.254:8101" />
    <allow-navigation href="http://10.237.205.159:8100" />
    <allow-navigation href="http://10.60.2.245:8100" />
    <allow-navigation href="http://10.60.2.245:8101" />
    <allow-navigation href="http://172.23.54.41:8100" />
    <allow-navigation href="http://192.168.150.101:8100" />
    <allow-navigation href="http://172.31.98.12:8100" />
    <allow-navigation href="http://192.168.1.232:8100" />
    <allow-navigation href="http://10.60.0.22:8100" />
    <allow-navigation href="http://172.23.54.144:8100" />
    <allow-navigation href="http://10.60.3.128:8100" />
    <allow-navigation href="http://172.23.54.164:8100" />
    <allow-navigation href="http://172.23.54.98:8100" />
    <allow-navigation href="http://10.60.2.147:8100" />
    <allow-navigation href="http://172.23.54.249:8100" />
    <allow-navigation href="http://192.168.5.175:8100" />
    <allow-navigation href="http://172.20.10.2:8101" />
    <allow-navigation href="http://192.168.150.108:8100" />
    <allow-navigation href="http://10.60.2.86:8100" />
    <allow-navigation href="http://172.23.54.44:8100" />
    <platform name="android">
        <allow-intent href="market:*" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
    </platform>
    <preference name="ShowSplashScreenSpinner" value="false" />
    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="KeyboardDisplayRequiresUserAction" value="false" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="0" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="0" />
    <feature name="StatusBar">
        <param name="ios-package" onload="true" value="CDVStatusBar" />
    </feature>
    <icon src="resources/ios/icon/icon-small@3x.png" />
    <allow-navigation href="http://169.254.83.211:8100" />
    <allow-navigation href="http://169.254.107.228:8100" />
    <allow-navigation href="http://169.254.217.21:8100" />
    <allow-navigation href="http://169.254.164.37:8100" />
    <allow-navigation href="http://169.254.147.106:8100" />
    <allow-navigation href="http://169.254.49.68:8100" />
    <allow-navigation href="http://169.254.124.255:8100" />
    <allow-navigation href="http://172.23.35.244:8100" />
    <allow-navigation href="http://169.254.85.129:8100" />
    <allow-navigation href="http://169.254.198.146:8100" />
    <allow-navigation href="http://169.254.198.146:8101" />
    <allow-navigation href="http://169.254.231.164:8100" />
    <engine name="ios" spec="^4.4.0" />
    <plugin name="cordova-plugin-app-version" spec="^0.1.9" />
    <plugin name="cordova-plugin-cocoapod-support" spec="^1.3.0" />
    <plugin name="cordova-plugin-compat" spec="^1.1.0" />
    <plugin name="cordova-plugin-console" spec="^1.0.7" />
    <plugin name="cordova-plugin-contacts" spec="^2.3.1">
        <variable name="CONTACTS_USAGE_DESCRIPTION" value=" " />
    </plugin>
    <plugin name="cordova-plugin-device" spec="^1.1.6" />
    <plugin name="cordova-plugin-email-composer" spec="^0.8.7" />
    <plugin name="cordova-plugin-facebook4" spec="^1.9.1">
        <variable name="APP_ID" value="XXXXXX" />
        <variable name="APP_NAME" value="XXXXXX" />
    </plugin>
    <plugin name="cordova-plugin-firebase-analytics" spec="^0.10.1" />
    <plugin name="cordova-plugin-inappbrowser" spec="^1.7.1" />
    <plugin name="cordova-plugin-native-keyboard" spec="^1.4.1">
        <variable name="LICENSE" value="XXXXXX" />
    </plugin>
    <plugin name="cordova-plugin-nativestorage" spec="^2.2.2" />
    <plugin name="cordova-plugin-network-information" spec="^1.3.3" />
    <plugin name="cordova-plugin-sim" spec="^1.3.3" />
    <plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
    <plugin name="cordova-plugin-statusbar" spec="^2.2.3" />
    <plugin name="cordova-plugin-vibration" spec="^2.1.5" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
    <plugin name="cordova-sms-plugin" spec="^0.1.11" />
    <plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
    <plugin name="mx.ferreyra.callnumber" spec="~0.0.2" />
    <plugin name="phonegap-plugin-push" spec="^2.0.0">
        <variable name="SENDER_ID" value="XXXXXX" />
    </plugin>
</widget>
1 Like

This might cause problems if you decide to publish the app - you should provide a value on installation of the plugin.

Thanks for the advice! I’ll promptly look into it.

After updating to cli 3.6.0 and ionic 3.9.2 I get a previously unencountered error with ionic upload:

[WARN] No Cordova platforms listed in config.xml. Nothing to prepare.

Fails to upload the snap shot.
Does however work with --nobuild flag

here’s my output:

ionic info

cli packages: (C:\Users\scott\Ionic\fireTest\node_modules)

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 7.0.1

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : none
Ionic Framework    : ionic-angular 3.6.0

System:

Node : v6.11.2
npm  : 5.3.0
OS   : Windows 10

C:\Users\scott\Ionic\fireTest>ionic upload
[INFO] Running app-scripts build:

[14:41:21] build dev started …
[14:41:21] clean started …
[14:41:21] clean finished in 16 ms
[14:41:21] copy started …
[14:41:22] transpile started …
[14:41:27] transpile finished in 5.63 s
[14:41:27] preprocess started …
[14:41:27] deeplinks started …
[14:41:27] deeplinks finished in 250 ms
[14:41:27] preprocess finished in 266 ms
[14:41:27] webpack started …
[14:41:28] copy finished in 6.12 s
[14:41:41] webpack finished in 13.30 s
[14:41:41] sass started …
[14:41:44] sass finished in 3.17 s
[14:41:44] postprocess started …
[14:41:44] postprocess finished in 18 ms
[14:41:44] lint started …
[14:41:44] build dev finished in 22.48 s

ionic cordova prepare
[WARN] No Cordova platforms listed in config.xml. Nothing to prepare.

   You can save your installed platforms to config.xml with the ionic cordova platform save command.

[14:41:48] lint finished in 4.41 s

C:\Users\scott\Ionic\fireTest>ionic upload --nobuild
√ Requesting snapshot upload - done!
√ Uploading snapshot - done!
[OK] Uploaded snapshot 1efc369b-1c90-4160-a97f-77e9327217df!

C:\Users\scott\Ionic\fireTest> ionic cordova platform list

cordova platform ls
√ Running command - done!
Installed platforms:

Available platforms:
android ~6.2.2
blackberry10 ~3.8.0 (deprecated)
browser ~4.1.0
webos ~3.7.0
windows ~5.0.0

C:\Users\scott\Ionic\fireTest>cordova platform list
Installed platforms:

Available platforms:
android ~6.2.2
blackberry10 ~3.8.0 (deprecated)
browser ~4.1.0
webos ~3.7.0
windows ~5.0.0
{}

As the error messages tell you, you don’t have a platform installed in your project. Run ionic cordova platform add ios or ... android to add these so cordova prepare can actually prepare anything before upload.

Was cordova prepare recently added to ionic upload? Just want to pin down the surce of this error.
I’ll be switching to the new git based version soon, along with the new ionic view client.

Yes, I think this is a recent addition.

Try these:
ionic cordova platform add android --save
If that fails, can you show us the error?
You could use this as resolution if that one fails:
cordova platform add android --save

Regards,
Neonic1

Capture

I’m unable to run my app on my Android R1 HD device. Debugging is on. I’ve been looking up solutions left and right having no luck.

Please try this

cordova platform add android --nofetch

Capture6

I have the same issue from today! How can I build?

Ionic info:

   @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 7.0.1

local packages:

@ionic/app-scripts : 2.1.3
Cordova Platforms  : ios
Ionic Framework    : ionic-angular 3.6.0

System:

ios-deploy : 1.9.1
ios-sim    : 6.0.0
Node       : v7.2.1
npm        : 5.3.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.3 Build version 8E3004b

cordova platform add ios --save
:heavy_multiplication_x: Running command - failed!
[WARN] Platform already added. Saving platforms to config.xml.

ionic cordova prepare
[WARN] No Cordova platforms listed in config.xml. Nothing to prepare.
   You can save your installed platforms to config.xml with the ionic cordova platform save command.

ionic cordova platform add android --save, ionic cordova prepare android --save?

Regards,
Neonic1

@Neonic this worked for me, thanks!

1 Like