使用PhoneGap Build构建的Android应用程序不会显示在Google Play上的平板电脑
我使用PhoneGap Build构建了一个应用程序,并成功将其提交给Google Play。成功意味着它可以通过我的Nexus S上的Google Play和运行Android的其他智能手机(Android 2.2及更高版本)使用。使用PhoneGap Build构建的Android应用程序不会显示在Google Play上的平板电脑
但是,该应用并没有出现在我尝试过的任何Android平板电脑设备上的Google Play(华硕/谷歌Nexus 7与Android 4.2.1和三星平板电脑与Android 4.0.1)。
如果我要从Hockey App下载.apk,应用程序将按照预期安装并运行。
我的PhoneGap构建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="*" />
从我的角度来看,这似乎是直接关系到屏幕尺寸/平板电脑的格式。但我不知道Google为什么不在大屏幕设备上列出应用程序。
目前无法使用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"
/>
我能够增加支持devies的数量。但我也不得不添加
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
让我提到的平板电脑支持。
而不是1.836支持的设备之前,现在列出2.341。
如果您登录Play商店,则可以转到APK并查看是否排除了任何设备。您也可以单击版本代码下的“显示详细信息”以查看所有属性。
我的猜想可能与“屏幕布局”或支持的dpi值有关,因此您需要适当修改清单。
支持的设备:1819,不包括:0 ... – 2013-02-18 14:23:26
有趣的是,如果我检查我自己的应用程序(确实出现在平板电脑上),我会获得支持的设备:2204.我会看看您是否可以检查AndroidManifest.xml – James 2013-02-18 17:47:08
目前我正在通过PhoneGap Build构建应用程序,这是一个在线构建服务器。它并没有给我自己配置androidmanifest.xml的机会,所以最好切换回手动构建.apk。感谢您的信息。 – 2013-02-18 20:11:09
您可以分享应用程序的Play商店链接或应用程序的名称。 – 2013-02-18 14:02:07