Ionic Cordova在Play商店上构建/显示支持的设备 [英] Ionic Cordova Build / Manifest Supported Devices on Play Store
问题描述
我正在使用Ionic Cordova来构建Android应用.我已按照Ionic的部署说明将应用程序构建并部署到Play商店.除了我只支持5674台设备之外,这还算不错.不支持许多设备(例如我开发的Nexus 5).
I'm using Ionic Cordova for building an Android app. I've built and deployed the app to Play Store using Ionic's deployment instructions. This has worked fine apart from, I only support 5674 devices. Many devices like Nexus 5 (which I developed with) is not supported.
我假设这与我的config.xml或AndroidManifest有关,因此在下面发布:
I am assuming this is something to do with my config.xml or AndroidManifest so posted below:
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>
有什么想法吗?谢谢.
推荐答案
我想您会发现,如果从可修复它的AndroidManifest.xml中删除了<compatible-screens>
块,就会发现它.
I think you'll find if you remove the <compatible-screens>
block from your AndroidManifest.xml that will fix it.
您是自己添加它们还是它是插件?
Did you add them yourself or was it a plugin?
原因是Nexus 5是xxhdpi屏幕,而兼容屏幕却没有.全部添加(也为xxxhdpi)或删除整个块
The reason being is that the Nexus 5 is a xxhdpi screen and the compatible screens doesn't have that. Either add them all (xxxhdpi too) or remove the whole block
这篇关于Ionic Cordova在Play商店上构建/显示支持的设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!