PhoneGAP Build - Google Play上不支持的设备

时间:2013-05-18 20:48:03

标签: cordova google-play phonegap-build

发布PGB生成的APK时,谷歌播放称267台设备“不支持”该应用程序,包括谷歌Nexus 7.

config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns = "http://www.w3.org/ns/widgets"
    xmlns:gap = "http://phonegap.com/ns/1.0"
    id        = "com.test"
    version   = "1.0.0">

    <name>Test</name>

    <description>Test</description>

    <author href="http://www.test.com/" email="info@test.com">Test</author>

    <preference name="phonegap-version"           value="2.5.0" />          <!-- all: current version of PhoneGap -->
    <preference name="orientation"                value="default" />        <!-- all: default means both landscape and portrait are enabled -->
    <preference name="target-device"              value="universal" />      <!-- all: possible values handset, tablet, or universal -->
    <preference name="fullscreen"                 value="true" />           <!-- all: hides the status bar at the top of the screen -->
    <preference name="webviewbounce"              value="false" />          <!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
    <preference name="prerendered-icon"           value="true" />           <!-- ios: if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen -->
    <preference name="stay-in-webview"            value="false" />          <!-- ios: external links should open in the default browser, 'true' would use the webview the app lives in -->
    <preference name="ios-statusbarstyle"         value="black-opaque" />   <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
    <preference name="detect-data-types"          value="false" />          <!-- ios: controls whether data types (such as phone no. and dates) are automatically turned into links by the system -->
    <preference name="exit-on-suspend"            value="false" />          <!-- ios: if set to true, app will terminate when home button is pressed -->
    <preference name="show-splash-screen-spinner" value="false" />          <!-- ios: if set to false, the spinner won't appear on the splash screen during app loading -->
    <preference name="auto-hide-splash-screen"    value="false" />          <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
    <preference name="disable-cursor"             value="false" />          <!-- blackberry: prevents a mouse-icon/cursor from being displayed on the app -->
    <preference name="android-minSdkVersion"      value="7" />              <!-- android: MIN SDK version supported on the target device. MAX version is blank by default. -->
    <preference name="android-installLocation"    value="auto" />           <!-- android: app install location. 'auto' will choose. 'internalOnly' is device memory. 'preferExternal' is SDCard. -->

    <gap:plugin name="BarcodeScanner" />
    <gap:plugin name="GenericPush" />
    <gap:plugin name="GAPlugin" />

    <access origin="*" />

    <icon src="icon.png" />
    <gap:splash src="splash.png" />

</widget>

任何想法如何解决?

1 个答案:

答案 0 :(得分:1)

通常,AndroidManifest.xml是您需要检查的文件。您应该确保添加uses-feature并为项目指定android:required =“false”,例如您的应用程序不需要的相机。我已成功将以下内容添加到Cordova / PhoneGap应用程序中,以支持更广泛的设备:

    <!-- support a wider range of devices by not requiring a camera, gps, microphone or phone -->
    <uses-feature android:name="android.hardware.camera" android:required="false" />
    <uses-feature android:name="android.hardware.location" android:required="false" />
    <uses-feature android:name="android.hardware.location.GPS" android:required="false" />
    <uses-feature android:name="android.hardware.microphone" android:required="false" />
    <uses-feature android:name="android.hardware.telephony" android:required="false" />

另外,您可以针对Google Nexus 7特有的问题查看Google Play excludes devices和其他类似结果。

Google表示可以检查APK支持的设备列表以进行应用过滤(http://developer.android.com/distribute/googleplay/quality/tablet.html#google-play):确认应用的过滤将应用上传到开发者控制台后,请检查APK的支持设备列表以确保该应用未从您要定位的平板电脑设备中过滤掉。