android - ionic/cordova - 我的应用程序只支持 297 台设备

标签 android cordova ionic-framework phonegap-plugins

我使用 Ionic/Cordova 构建我的应用程序。当我尝试在 Google Play 商店上发布我的应用程序时,它仅支持 297 台设备(仅平板电脑)。

我从头开始应用 ionic start app

Ionic Cordova Build / Manifest Supported Devices on Play Store 此链接似乎与我的问题有关,但我的配置看起来不错。

我已经添加了我的配置文件。

干杯!

config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.ionicframework.tekoria570195" version="1.0.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>TeKoria</name>
    <description>
    Te Koria mobile application
  </description>
    <author email="nicholas@tekoria.com" href="http://ionicframework.com/">
    Ionic Framework Team
  </author>
    <content src="index.html" />
    <access origin="*" />
    <access launch-external="yes" origin="tel:*" />
    <access launch-external="yes" origin="mailto:*" />
    <access launch-external="yes" origin="sms:*" />
    <allow-navigation href="*" />
    <preference name="webviewbounce" value="true" />
    <preference name="UIWebViewBounce" value="true" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="android-targetSdkVersion" value="23" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="ShowSplashScreen" value="true" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="1000" />
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="FadeSplashScreen" value="false" />
    <preference name="loadUrlTimeoutValue" value="700000" />
    <preference name="xwalkVersion" value="xwalk_core_library_beta:18+" />
    <preference name="xwalkCommandLine" value="--disable-pull-to-refresh-effect" />
    <preference name="xwalkMode" value="embedded" />
    <preference name="xwalkMultipleApk" value="true" />
    <feature name="StatusBar">
        <param name="ios-package" onload="true" value="CDVStatusBar" />
    </feature>
    <platform name="android">
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
    </platform>
    <platform name="ios">
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
    </platform>
    <icon src="resources/android/icon/drawable-xhdpi-icon.png" />
    <plugin name="cordova-plugin-camera" spec="~2.3.0">
        <variable name="CAMERA_USAGE_DESCRIPTION" value="Used to upload photos to board" />
        <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="Used to upload photos to board" />
    </plugin>
    <plugin name="cordova-plugin-networkinterface" spec="~1.0.8" />
    <plugin name="cordova-plugin-whitelist" spec="~1.2.2" />
    <plugin name="cordova-plugin-crosswalk-webview" spec="~1.8.0" />
    <plugin name="cordova-plugin-statusbar" spec="~2.1.3" />
    <plugin name="cordova-plugin-device" spec="~1.1.2" />
    <plugin name="cordova-plugin-geolocation" spec="~2.2.0" />
    <plugin name="cordova-plugin-splashscreen" spec="~3.2.2" />
    <plugin name="cordova-plugin-dialogs" spec="~1.2.1" />
    <plugin name="cordova-plugin-file-transfer" spec="~1.5.1" />
    <plugin name="cordova-plugin-inappbrowser" spec="~1.4.0" />
    <plugin name="cordova-plugin-contacts" spec="~2.1.0" />
    <plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
    <plugin name="cordova-plugin-google-analytics" spec="https://github.com/danwilson/google-analytics-plugin.git" />
    <plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" source="npm" />
    <engine name="android" spec="~5.2.2" />
    <plugin name="phonegap-plugin-push" spec="~1.8.4">
        <variable name="SENDER_ID" value="TEMP" />
    </plugin>
</widget>

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.ionicframework.tekoria570195"
    android:hardwareAccelerated="true"
    android:versionCode="100054"
    android:versionName="1.0.5" >

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="23" />

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

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.WRITE_CONTACTS" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="com.ionicframework.tekoria570195.permission.C2D_MESSAGE" />

    <permission
        android:name="com.ionicframework.tekoria570195.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />
    <!-- for android -->
    <!-- <uses-permission android:name="com.android.launcher.permission.READ_SETTINGS"/> -->
    <!-- <uses-permission android:name="com.android.launcher.permission.WRITE_SETTINGS"/> -->
    <!-- <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" /> -->
    <!-- <uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" /> -->
    <!-- for Samsung -->
    <uses-permission android:name="com.sec.android.provider.badge.permission.READ" />
    <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE" /> <!-- for htc -->
    <uses-permission android:name="com.htc.launcher.permission.READ_SETTINGS" />
    <uses-permission android:name="com.htc.launcher.permission.UPDATE_SHORTCUT" /> <!-- for sony -->
    <uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE" /> <!-- for apex -->
    <uses-permission android:name="com.anddoes.launcher.permission.UPDATE_COUNT" /> <!-- for solid -->
    <uses-permission android:name="com.majeur.launcher.permission.UPDATE_BADGE" />

    <application
        android:hardwareAccelerated="true"
        android:icon="@drawable/icon"
        android:label="@string/app_name"
        android:supportsRtl="true" >
        <activity
            android:name="com.ionicframework.tekoria570195.MainActivity"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
            android:label="@string/activity_name"
            android:launchMode="singleTop"
            android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
            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>

        <receiver
            android:name="com.google.android.gms.analytics.AnalyticsReceiver"
            android:enabled="true" >
            <intent-filter>
                <action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
            </intent-filter>
        </receiver>

        <service
            android:name="com.google.android.gms.analytics.AnalyticsService"
            android:enabled="true"
            android:exported="false" />

        <receiver
            android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
            android:enabled="true"
            android:exported="true" >
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER" />
            </intent-filter>
        </receiver>

        <service
            android:name="com.google.android.gms.analytics.CampaignTrackingService"
            android:enabled="true"
            android:exported="false" />

        <activity
            android:name="com.adobe.phonegap.push.PushHandlerActivity"
            android:exported="true" />

        <receiver android:name="com.adobe.phonegap.push.BackgroundActionButtonHandler" />
        <receiver
            android:name="com.google.android.gms.gcm.GcmReceiver"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />

                <category android:name="com.ionicframework.tekoria570195" />
            </intent-filter>
        </receiver>

        <service
            android:name="com.adobe.phonegap.push.GCMIntentService"
            android:exported="false" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            </intent-filter>
        </service>
        <service
            android:name="com.adobe.phonegap.push.PushInstanceIDListenerService"
            android:exported="false" >
            <intent-filter>
                <action android:name="com.google.android.gms.iid.InstanceID" />
            </intent-filter>
        </service>
        <service
            android:name="com.adobe.phonegap.push.RegistrationIntentService"
            android:exported="false" />

        <activity
            android:name="com.google.android.gms.common.api.GoogleApiActivity"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
    </application>

</manifest>

最佳答案

cordova clean 之后解决了一个问题 :)

关于android - ionic/cordova - 我的应用程序只支持 297 台设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40907462/

相关文章:

android - 使用 facebook 的 FriendPickerFragment 查找具有相同应用程序的 friend

android - Android 中的配置更改以及在实例状态中保存哪些变量

android - Intent.ACTION_SENDTO 显示两个选项,我只想显示一个

javascript - 点击事件仍然在div下面触发

javascript - 使用 POST 请求生成 GUID - Ionic

android - 无法连接到本地服务器

java - 如何使用 beans 将值插入到 sqlite 数据库中并将这些表值检索到 json 数组中

cordova - ionic : White space in bottom with wkwebview in IOS 11

javascript - getCurrentPosition 返回什么?

css - 应用 CSS 设置按钮内图标的位置