2

我使用 PhoneGap Build 构建了一个应用程序,并成功提交到 Google Play。成功意味着它可以通过 Google Play 在我的 Nexus S 和其他运行 Android(Android 2.2 及更高版本)的智能手机上使用。

但是该应用程序在我尝试过的任何安卓平板设备(华硕/谷歌 Nexus 7 和安卓 4.2.1 和三星平板电脑,安卓 4.0.1)上都没有出现在 Google Play 中。

如果我要从 Hockey App 下载 .apk,该应用程序会按预期安装和运行。

我的 PhoneGap Build config.xml 看起来像这样(摘录):

<!-- Multi-Platform -->

<preference name="phonegap-version" value="2.2.0" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="false" />
<preference name="orientation" value="default" />

<!-- iOS -->

<preference name="webviewbounce" value="false" />
<preference name="prerendered-icon" value="false" />
<preference name="stay-in-webview" value="false" />
<preference name="ios-statusbarstyle" value="black-opaque" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="true" />
<preference name="auto-hide-splash-screen" value="true" />


<!-- Android -->
<preference name="android-minSdkVersion" value="8" />


<!-- Icons -->
<icon src="icon57.png" width="57" height="57" />
<icon src="icon72.png" gap:platform="ios" width="72" height="72" />
<icon src="icon114.png" width="114" height="114" />

<icon src="icon54.png" gap:platform="android" gap:density="mdpi" />
<icon src="icon72.png" gap:platform="android" gap:density="hdpi" />
<icon src="icon114.png" gap:platform="android" gap:density="xhdpi" />


<!-- Splash Screens iOS -->
<gap:splash src="splash/ios/Default.png" width="320" height="480" />
<gap:splash src="splash/ios/Default_at_2x.png" width="640" height="960" />
<gap:splash src="splash/ios/Default_iphone5.png" width="640" height="1136" />
<gap:splash src="splash/ios/Default-Landscape.png" width="1024" height="768" />
<gap:splash src="splash/ios/Default-Portrait.png" width="768" height="1024" />

<!-- Splash Screens Android -->
<gap:splash src="splash/android/ldpi.png" gap:platform="android" gap:density="ldpi" />
<gap:splash src="splash/android/mdpi.png" gap:platform="android" gap:density="mdpi" />

<gap:splash src="splash/android/hdpi.png" gap:platform="android" gap:density="hdpi" />
<gap:splash src="splash/android/xhdpi.png" gap:platform="android" gap:density="xhdpi" />

<!-- Permissions -->

<preference name="permissions" value="none"/>

<feature name="http://api.phonegap.com/1.0/camera"/>
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/geolocation"/>
<feature name="http://api.phonegap.com/1.0/media"/>
<feature name="http://api.phonegap.com/1.0/network"/>

<!-- Global Domain Access -->
<access origin="*" />

从我的角度来看,它似乎与屏幕尺寸/平板电脑格式直接相关。但我不知道为什么谷歌没有在大屏幕设备上列出该应用程序。

4

2 回答 2

2

目前似乎无法通过 PhoneGap Build 运行它,因为 AndroidManifest.xml 的某些选项没有专门的支持。

所以我决定使用 Eclipse 以默认方式构建应用程序(请参阅http://docs.phonegap.com/en/2.4.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android)。

通过增加

<supports-screens
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:xlargeScreens="true"
    android:resizeable="true"
    android:anyDensity="true"
    />

我能够增加支持的设备数量。但我也不得不添加

<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>

让我提到的平板电脑得到支持。

现在列出了 2.341,而不是之前支持的 1.836 设备。

于 2013-02-21T11:35:21.213 回答
1

如果您登录 Play 商店,您可以转到您的 APK 并查看是否排除了任何设备。您还可以单击版本代码下的“显示详细信息”以查看所有属性。

我的猜测可能与“屏幕布局”或支持的 dpi 值有关,这是问题所在,您需要适当地修改清单。

于 2013-02-18T14:16:35.423 回答