我遇到了一些使用PhoneGap 3.5.0的Android初始屏幕問題。當我做一個構建,我看到在平臺/安卓/ RES閃屏文件的一些怪異的結果:PhoneGap構建android初始屏幕不工作
- 某些文件夾複製在splash.png文件如預期(繪製,繪製土地,繪製-hdpi,drawable-ldpi,drawable-mdpi,drawable-xhdpi)
- 某些文件夾複製到splash.png,並且還包含默認的PhoneGap啓動畫面,其名稱爲screen.png(drawable-land-hdpi,drawable-land- ldpi,drawable-land-mdpi,drawable-land-xhdpi)
- 某些文件夾只包含默認的PhoneGap啓動畫面,其名稱爲screen.png(drawable-port-hdpi,drawable-port-ldpi,drawable-port-mdpi ,drawable-port-xhdpi)
第二個問題是,儘管在文件夾中出現閃屏圖像,但在測試應用程序時,我看到黑屏而不是我的自定義閃屏或默認的PhoneGap啓動畫面。
我發現了幾篇關於此問題的文章,但沒有一篇修復程序適用於我。一些我試過的東西包括:
- 削去下來的圖像選項的數量和使用9切片圖像(Black splash screen - Phonegap Build (Android))
- 交換:預選賽和:密度我config.xml中(http://phonegap.com/blog/2014/04/11/phonegap-build-adds-some-new-features/)
- 添加org.apache.cordova.splashscreen插件
- 添加閃屏和SplashScreenDelay偏好到我的config.xml(也與上述相結合)(phonegap dont show splashscreen)
其他一些注意事項:
- 初始屏幕在iOS版本中正常工作。
- 我想在PhoneGap的構建中解決這個問題...我想避免編輯Android特定的文件
- 我想知道是否有可能需要清除某處的緩存。在這個項目的早期版本中,我已經獲得了Android初始屏幕的成功,並且已經更新了我的PhoneGap版本。
- 我有一個grunt-phonegap設置,但是如果我使用
phonegap local build
而不是grunt platform-build
,我會看到相同的錯誤。 - 我潑鏈接看起來像
<gap:splash src="www/res/screen/android/drawable-land-hdpi/splash.png" gap:platform="android" gap:qualifier="land-hdpi" />
如果任何人有任何建議,我很想聽聽他們。謝謝!
必須解決您的問題 – saikrupa 2016-11-07 05:29:18