2013-02-18 52 views
2

我使用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爲什麼不在大屏幕設備上列出應用程序。

+0

您可以分享應用程序的Play商店鏈接或應用程序的名稱。 – 2013-02-18 14:02:07

回答

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" 
    /> 

我能夠增加支持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。

+0

我發現這個評論可能會解釋一些事情:<! - 不需要相機,因爲這需要一個後置攝像頭。這允許它在Nexus 7上工作 - > 2014-02-14 06:40:55

+0

請參閱此示例以瞭解如何使用Phonegap執行此操作: https://stackoverflow.com/questions/29434321/phonegap-make-android-feature-optional – Nukey 2017-07-03 13:50:12

+0

Additonal Comment:一定要指定android,如下所示:https://stackoverflow.com/a/31218168/1218136 – Nukey 2017-07-03 14:43:00

1

如果您登錄Play商店,則可以轉到APK並查看是否排除了任何設備。您也可以單擊版本代碼下的「顯示詳細信息」以查看所有屬性。

我的猜想可能與「屏幕布局」或支持的dpi值有關,因此您需要適當修改清單。

+0

支持的設備:1819,不包括:0 ... – 2013-02-18 14:23:26

+0

有趣的是,如果我檢查我自己的應用程序(確實出現在平板電腦上),我會獲得支持的設備:2204.我會看看您是否可以檢查AndroidManifest.xml – James 2013-02-18 17:47:08

+0

目前我正在通過PhoneGap Build構建應用程序,這是一個在線構建服務器。它並沒有給我自己配置​​androidmanifest.xml的機會,所以最好切換回手動構建.apk。感謝您的信息。 – 2013-02-18 20:11:09

相關問題