2017-09-06 85 views
0

我得到一個錯誤「解析錯誤 - 安裝(無符號或有符號)phonegap apk時解析包」時出現問題。以下是配置文件。我已經搜索了這個問題。但是,未能得到適當的解決方案。任何幫助將不勝感激。解析安裝PhoneGap時出錯android應用程序

<?xml version='1.0' encoding='utf-8'?> 
 
<widget id="ITInterviewPrepApp.lucidapps" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0"> 
 
    <plugin name="cordova-plugin-file" source="npm" spec="~4.1.1" /> 
 
    <name>ITInterviewPrepApp</name> 
 
    <description>Hello World sample application that responds to the deviceready event.</description> 
 
    <author email="[email protected]" href="http://phonegap.com">PhoneGap Team</author> 
 
    <content src="index.html" /> 
 
    <access origin="*" /> 
 
    <allow-intent href="http://*/*" /> 
 
    <allow-intent href="https://*/*" /> 
 
    <allow-intent href="tel:*" /> 
 
    <allow-intent href="sms:*" /> 
 
    <allow-intent href="mailto:*" /> 
 
    <allow-intent href="geo:*" /> 
 
    <icon density="ldpi" src="www/res/icon/android/drawable-ldpi-icon.png" /> 
 
    <icon density="mdpi" src="www/res/icon/android/drawable-mdpi-icon.png" /> 
 
    <icon density="hdpi" src="www/res/icon/android/drawable-hdpi-icon.png" /> 
 
    <icon density="xhdpi" src="www/res/icon/android/drawable-xhdpi-icon.png" /> 
 
    <icon density="xxhdpi" src="www/res/icon/android/drawable-xxhdpi-icon.png" /> 
 
    <icon density="xxxhdpi" src="www/res/icon/android/drawable-xxxhdpi-icon.png" /> 
 
    <splash density="land-ldpi" src="www/res/screen/android/drawable-land-ldpi-screen.png" /> 
 
    <splash density="land-mdpi" src="www/res/screen/android/drawable-land-mdpi-screen.png" /> 
 
    <splash density="land-hdpi" src="www/res/screen/android/drawable-land-hdpi-screen.png" /> 
 
    <splash density="land-xhdpi" src="www/res/screen/android/drawable-land-xhdpi-screen.png" /> 
 
    <splash density="land-xxhdpi" src="www/res/screen/android/drawable-land-xxhdpi-screen.png" /> 
 
    <splash density="land-xxxhdpi" src="www/res/screen/android/drawable-land-xxxhdpi-screen.png" /> 
 
    <splash density="port-ldpi" src="www/res/screen/android/drawable-port-ldpi-screen.png" /> 
 
    <splash density="port-mdpi" src="www/res/screen/android/drawable-port-mdpi-screen.png" /> 
 
    <splash density="port-hdpi" src="www/res/screen/android/drawable-port-hdpi-screen.png" /> 
 
    <splash density="port-xhdpi" src="www/res/screen/android/drawable-port-xhdpi-screen.png" /> 
 
    <splash density="port-xxhdpi" src="www/res/screen/android/drawable-port-xxhdpi-screen.png" /> 
 
    <splash density="port-xxxhdpi" src="www/res/screen/android/drawable-port-xxxhdpi-screen.png" /> 
 
    <allow-intent href="market:*" /> 
 
    <preference name="loglevel" value="DEBUG" /> 
 
    <preference name="DisallowOverscroll" value="true" /> 
 
    <preference name="android-minSdkVersion" value="14" /> 
 
</widget>

感謝, 斯里

回答

0

我已經解決了這個問題,如下:

  1. 連接我的設備在調試模式(啓用下設置 - USB調試>開發人員選項)到我的電腦。

  2. 運行的命令亞行從%ANDROID_HOME%\平臺工具文件夾中安裝「路徑簽署APK」

我得到了一個錯誤 - INSTALL_PARSE_FAILED_MANIFEST_MALFORMED在命令提示符。

期:在我的android清單文件中,包名稱有大寫字母。我假設cordova/phonegap應用程序的軟件包名稱不應包含大寫字母。

解決方案:我創建了一個包名不帶大寫字符的新apk。建立,簽名,我能夠安裝apk成功

注意: 你應該在你的機器上安裝android sdk。你的apk必須簽名。

相關問題