Error building ios with cordova

后端 未结 17 1542
-上瘾入骨i
-上瘾入骨i 2021-02-03 22:32

I have a problem when I build the ios platform with cordova. I have all the certificates for the app and device, but when I try to run in my ios device, doing ionic run ios, the

相关标签:
17条回答
  • 2021-02-03 23:37

    I ran into the same problem:

    Error: Source path does not exist: resources/ios/icon/icon-40@3x.png

    Looks like the relative path is in reference to the config.xml. If the resources folder exists inside of 'www', then you may need to update the relative path.

    I was able to resolve this by updating the relative path to "www/resources/...".

    0 讨论(0)
  • 2021-02-03 23:38

    I got similar issue with cordova-ios@~4.5.1

    ionic cordova build ios

    > cordova build ios
    Error: Source path does not exist: resources\android\icon\drawable-xhdpi-icon.png
    
    [ERROR] An error occurred while running cordova build ios (exit code 1).
    

    ionic cordova platform add ios

    > cordova platform add ios --save
    Using cordova-fetch for cordova-ios@~4.5.1
    
    Adding ios project...
    
    Creating Cordova project for the iOS platform:
    
    Path: platforms/ios
    Package: -
    Name: -
    iOS project created with cordova-ios@4.5.4
    
    Error: Source path does not exist: resources\android\icon\drawable-xhdpi-icon.png
    

    I remove ios platform

    ionic cordova platform remove ios
    

    And add ios platform with old one

    ionic cordova platform add ios@4.0.0
    

    This worked for me, waiting for an Cordova update :)

    0 讨论(0)
  • 2021-02-03 23:38

    make sure you add: xmlns:cdv="http://cordova.apache.org/ns/1.0

    to the widget section(on the very top) of your config.xml

    This will add all necessary Cordova components.

    0 讨论(0)
  • 2021-02-03 23:39

    I had to manually copy the files from any another project repo such as https://github.com/sphilee/eTAS_GPS/tree/master/resources/ios

    0 讨论(0)
  • 2021-02-03 23:39

    I used the no brain way, but it works. I added the ressources temporarily with the name they ask for.

    Like I copy and past an image icon-20 copy.png then rename it into my needed ressources like icon-small@2x.png

    0 讨论(0)
提交回复
热议问题