我已經使用Cordova將我的網頁應用程序轉換爲apk。安裝Cordova構建的apk文件時會導致解析錯誤?
該應用的目標設備是泰國的OTPC(每個兒童一個平板)平板電腦。
這些平板電腦禁用了Google Play,因此必須手動安裝應用。我遵循了所有通常的步驟,例如允許不明來源。
在構建應用程序的惡作劇版本之後,它安裝在我的Galaxy Tab 3V上,沒有問題。它也很容易安裝在學校常見的OTPC設備之一上,但另一方面,我得到了着名的分析錯誤。
這兩個設備都是Android 4.0.3。
因此,我花了幾個小時嘗試對Cordova config.xml文件進行不同的更改,但目前還沒有運氣。我的問題是,我在黑暗中四處尋找,沒有指出導致此設備上出現分析錯誤的原因。
所以有一種方法(例如通過adb安裝)獲取有關此特定解析錯誤的更多信息。
對於它的價值,這裏是我最近的config.xml文件。也許有人可以建議更改:
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.English_Builder" version="0.9.50" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<icon src="www/images/formatting/e_b_icon.png" />
<name>English_Builder</name>
<description>
English Builder helps Thai students of English to build vocabulary and skills, through competitive timed activities.
</description>
<author email="[email protected]" href="https://github.com/Iansamit/English_Builder">
Ian Smith
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<platform name="android">
<allow-intent href="*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<plugin name="cordova-plugin-media" spec="~2.3.0" />
</widget>
? – Gandhi
感謝Ghandi的迴應。是的,它基於默認的Cordova「MyApp」。之後,我在config.xml中完成了他們的文檔並改變了我認爲合適的內容。最近的更改從更改爲,因爲這不是從Google Play安裝的。 –
Thailandian
我提出這個問題的原因是,有時候當你將粘貼內容複製到config.xml中時,一些特殊字符和unicode字符將被複制到config.xml中,導致解析錯誤。更好地將內容複製到記事本然後嘗試將其複製到config.xml可能有些額外的空格或特殊字符可能會導致此問題 – Gandhi