Ionic splash screen not loading

前端 未结 2 1486
我在风中等你
我在风中等你 2021-01-25 19:32

I have checked and double checked Stack Overflow for an answer on this and i really can\'t find one. I am building an app using the ionic framework and although i have never had

相关标签:
2条回答
  • 2021-01-25 20:03
    1. go to: /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/resources.js
    2. change cacheImages property to false
    3. remove android platform
    4. re-add android platform
    5. regenerate resources

    And in config.xml make sure the code is configured as follows:

    <icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
    <splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
    <preference name="SplashScreen" value="screen"/>
    
    0 讨论(0)
  • 2021-01-25 20:10

    You need to change the <platform> section to have file names as screen.png as shown below. Your path for screen.png is incorrect Whenever you use any name for SplashScreen other than splash you need to update the config: https://cordova.apache.org/docs/en/3.1.0/cordova/splashscreen/splashscreen.html#android

    <platform name="android">
    
      <splash src="platform-resources/android/res/drawable-ldpi/screen.png" density="ldpi" />
    
      <splash src="platform-resources/android/res/drawable-mdpi/screen.png" density="mdpi" />
    
      <splash src="platform-resources/android/res/drawable-hdpi/screen.png" density="hdpi" />
    
      <splash src="platform-resources/android/res/drawable-xhdpi/screen.png" density="xhdpi" />
    
      <splash src="platform-resources/android/res/drawable-xxhdpi/screen.png" density="xxhdpi" />
    </platform>
    
    0 讨论(0)
提交回复
热议问题