安装PhoneGap android App

时间:2017-09-06 11:31:25

标签: cordova phonegap

我收到错误“解析错误 - 在安装(unsigned或signed)phonegap apk时解析包”时出现问题。以下是配置文件。我搜索了这个问题。但是,未能得到适当的解决方案。任何帮助将不胜感激。

<?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="support@phonegap.com" 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>

谢谢, 什里

1 个答案:

答案 0 :(得分:1)

我已解决了以下问题:

  1. 将我的设备以调试模式连接(在设置 - >开发人员选项下启用USB调试)到我的电脑。

  2. 从%ANDROID_HOME%\ platform-tools文件夹中执行 adb install&#34;已签名apk&#34; 的路径。

  3. 我在命令提示符下遇到错误 - INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

    问题:在我的Android清单文件中,包名称包含大写字符。我假设对于cordova / phonegap应用程序,包名称不应该包含大写字符。

    解决方案:我创建了一个新的apk,包名没有大写字符。构建,签名,我能够成功安装apk

    注意: 你应该在你的机器上安装android sdk。你的apk必须签名。