Android 设备兼容性问题
Android Device Compatibility Issues
我正在尝试提高我的应用程序的兼容性,因为它目前仅支持 21 台设备。我读到清单文件中的权限和功能决定了您的应用程序的兼容性。有没有办法检查每个功能或权限的兼容性?
是什么阻止我的应用程序获得更多支持的设备?
这是我的清单文件。
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light" >
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<receiver
android:name=".GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.example.example.example" />
</intent-filter>
</receiver>
<service android:name=".GcmIntentService" />
<activity
android:name=".MainActivity"
android:label="@string/app_name"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SplashScreen"
android:label="@string/app_name" android:theme="@style/Theme.AppCompat.Light.NoActionBar">
</activity>
<activity
android:name=".PostDetailActivity"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light"
android:windowSoftInputMode="stateHidden">
</activity>
<activity
android:name=".NotificationsActivity"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light"
android:windowSoftInputMode="adjustPan">
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="example"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.MAPS_RECEIVE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="com.example.example.importedapplication.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.example.importedapplication.permission.C2D_MESSAGE" />
<uses-feature android:name="com.google.android.maps" android:required="true" />
<permission
android:name="com.arshad.map.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="22" />
<uses-feature android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
我没用过,只是听说:
https://source.android.com/compatibility/cts/index.html
我知道 Google Play 也有一些功能(没用过,只是听说):
https://support.google.com/googleplay/android-developer/answer/1286017?hl=en
<uses-feature android:name="com.google.android.maps" android:required="true" />
这一行需要删掉,我删掉后,我支持的设备增加了大约8050
我正在尝试提高我的应用程序的兼容性,因为它目前仅支持 21 台设备。我读到清单文件中的权限和功能决定了您的应用程序的兼容性。有没有办法检查每个功能或权限的兼容性?
是什么阻止我的应用程序获得更多支持的设备?
这是我的清单文件。
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light" >
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<receiver
android:name=".GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.example.example.example" />
</intent-filter>
</receiver>
<service android:name=".GcmIntentService" />
<activity
android:name=".MainActivity"
android:label="@string/app_name"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SplashScreen"
android:label="@string/app_name" android:theme="@style/Theme.AppCompat.Light.NoActionBar">
</activity>
<activity
android:name=".PostDetailActivity"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light"
android:windowSoftInputMode="stateHidden">
</activity>
<activity
android:name=".NotificationsActivity"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light"
android:windowSoftInputMode="adjustPan">
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="example"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.MAPS_RECEIVE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="com.example.example.importedapplication.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.example.importedapplication.permission.C2D_MESSAGE" />
<uses-feature android:name="com.google.android.maps" android:required="true" />
<permission
android:name="com.arshad.map.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="22" />
<uses-feature android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
我没用过,只是听说: https://source.android.com/compatibility/cts/index.html
我知道 Google Play 也有一些功能(没用过,只是听说): https://support.google.com/googleplay/android-developer/answer/1286017?hl=en
<uses-feature android:name="com.google.android.maps" android:required="true" />
这一行需要删掉,我删掉后,我支持的设备增加了大约8050