2015-08-17 109 views
1

我正在使用Ionic Cordova構建Android應用程序。我已經使用Ionic的部署說明構建並將應用部署到Play商店。除此之外,這一切都很好,我只支持5674設備。 Nexus 5(我開發的)等許多設備不受支持。Play商店中的Ionic Cordova Build/Manifest支持的設備

我假定這是一件與我的config.xml或AndroidManifest所以下面貼:

config.xml中

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<widget id="xxx" version="0.0.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> 
    <name>xxx</name> 
    <description> 
     xxx. 
    </description> 
    <author email="xxx" href="xxx"> 
     xxx 
    </author> 
    <content src="index.html"/> 
    <access origin="*"/> 
    <allow-navigation href="xxx"/> 
    <preference name="webviewbounce" value="false"/> 
    <preference name="UIWebViewBounce" value="false"/> 
    <preference name="DisallowOverscroll" value="true"/> 
    <preference name="android-minSdkVersion" value="16"/> 
    <preference name="BackupWebStorage" value="none"/> 
    <preference name="SplashScreen" value="screen"/> 
    <preference name="SplashScreenDelay" value="3000"/> 
    <feature name="StatusBar"> 
    <param name="ios-package" value="CDVStatusBar" onload="true"/> 
    </feature> 
    <platform name="android"> 
    <icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/> 
    <icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/> 
    <icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/> 
    <icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/> 
    <icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/> 
    <icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/> 
    <splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/> 
    <splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/> 
    <splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/> 
    <splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/> 
    <splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/> 
    <splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/> 
    <splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/> 
    <splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/> 
    <splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/> 
    <splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/> 
    <splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/> 
    <splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/> 
    </platform> 
    <icon src="resources/android/icon/drawable-xhdpi-icon.png"/> 
</widget> 

AndroidManifest.xml中

<?xml version='1.0' encoding='utf-8'?> 
<manifest android:hardwareAccelerated="true" android:versionCode="3" android:versionName="0.0.3" package="xxx" xmlns:android="http://schemas.android.com/apk/res/android"> 
    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> 
    <compatible-screens> 
     <screen android:screenDensity="ldpi" android:screenSize="small" /> 
     <screen android:screenDensity="mdpi" android:screenSize="small" /> 
     <screen android:screenDensity="hdpi" android:screenSize="small" /> 
     <screen android:screenDensity="xhdpi" android:screenSize="small" /> 
     <screen android:screenDensity="ldpi" android:screenSize="normal" /> 
     <screen android:screenDensity="mdpi" android:screenSize="normal" /> 
     <screen android:screenDensity="hdpi" android:screenSize="normal" /> 
     <screen android:screenDensity="xhdpi" android:screenSize="normal" /> 
    </compatible-screens> 
    <uses-permission android:name="android.permission.INTERNET" /> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> 
    <application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true"> 
     <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize"> 
      <intent-filter android:label="@string/launcher_name"> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
    </application> 
    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" /> 
</manifest> 

有什麼建議嗎?謝謝。

回答

1

我想你會發現,如果你從你的AndroidManifest.xml中移除<compatible-screens>塊來解決它。

你自己添加它們還是它是一個插件?

原因是Nexus 5是xxhdpi屏幕,兼容屏幕沒有。要麼全部添加(xxxhdpi)或刪除整個區塊

+0

你說得對。我之前已經添加它來嘗試解決一個不同的問題。看起來現在已經修好了,謝謝。 – nickp90

+0

我有類似的問題。僅支持197個設備......但我根本沒有標籤。還有什麼我應該找的?在我的Manifest中,我有這樣的: chabislav

相關問題