为什么我的应用程序与我自己的设备不兼容?

时间:2021-02-08 00:06:25

My application, I recently tried to put on the market and it is not compatible with the device that I developed on! I read similar questions and responses however they didn't really help me because when I try to remove permissions or add all screen sizes and densities. Here it is the manifest:

我的应用程序,我最近试图投放市场,它与我开发的设备不兼容!我读了类似的问题和回答,但是他们并没有真正帮助我,因为当我尝试删除权限或添加所有屏幕大小和密度时。这是清单:

    <screen android:screenSize="large" android:screenDensity="ldpi" />
    <screen android:screenSize="large" android:screenDensity="mdpi" />
    <screen android:screenSize="large" android:screenDensity="hdpi" />
    <screen android:screenSize="large" android:screenDensity="xhdpi" />

    <screen android:screenSize="xlarge" android:screenDensity="ldpi" />
    <screen android:screenSize="xlarge" android:screenDensity="mdpi" />
    <screen android:screenSize="xlarge" android:screenDensity="hdpi" />
    <screen android:screenSize="xlarge" android:screenDensity="xhdpi" />

</compatible-screens>
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_LOGS" />
<!--   <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<!--  <uses-feature android:name="android.hardware.Sensor" android:required="false"/> -->

   android:allowBackup="true"
   android:icon="@drawable/rss"
   android:largeHeap="true"
   android:label="@string/app_name"
   android:theme="@style/AppTheme" >
   <activity
       android:name=".screen.SplashActivity"
       android:label="@string/app_name"
       android:theme="@android:style/Theme.DeviceDefault.Light.NoActionBar" >
       <intent-filter>
           <action android:name="android.intent.action.MAIN" />

           <category android:name="android.intent.category.LAUNCHER" />
       </intent-filter>
   </activity>
   <activity
       android:name=".screen.MainActivity"
       android:configChanges="orientation|screenSize"
       android:label="@string/app_name" >
   </activity>





   <activity
       android:name=".screen.ProgramLogActivity"
       android:label="@string/title_activity_program_log" >
   </activity>

3 个解决方案

#1


1  

Remove tag, and add just support screen tag as below,

删除标记,并添加支持屏幕标记,如下所示,

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

Hope this helps you.

希望这对你有所帮助。

#2


0  

Remove <compatible-screens >

or

要么

Put below code and try

放在下面的代码并尝试

 <screen android:screenSize="normal" android:screenDensity="ldpi" />
    <screen android:screenSize="normal" android:screenDensity="mdpi" />
    <screen android:screenSize="normal" android:screenDensity="hdpi" />
    <screen android:screenSize="normal" android:screenDensity="xhdpi" />
<screen android:screenSize="normal" android:screenDensity="xxhdpi" />

#3


0  

Thank you All, I want to sum up things I learned by encountering with this problem. The properties given in manifest files with the tags like supports-screens, uses-sdk or uses-feature are actually filters of google play. You can find more details in this [link][1]: Basically, filters are given in the manifest file and they decide which devices will be compatible or not compatible. In order to support as much as device possible, I suggest you to keep your manifest filters simple ; Except then necessary permissions or features, try not to add anything extra to the manifest file. If you need to use feature, try make required="false". Consider the fact there are some permissions requires uses-feature tag to be used and there are other permissions don't. Try to read about before publishing your app. Here detailed information about [manifest tags][2] Try to support as many sdk's as possible. You can set it in the manifest like this: Try to use supports-screens rather than using compatible-screens tag. It worked for me at least!

谢谢大家,我想总结一下我遇到这个问题所学到的东西。清单文件中提供的属性(如支持屏幕,uses-sdk或uses-feature)实际上是Google Play的过滤器。您可以在[link] [1]中找到更多详细信息:基本上,过滤器在清单文件中给出,它们决定哪些设备兼容或不兼容。为了尽可能多地支持设备,我建议您保持简单过滤器的简单;除了必要的权限或功能之外,请尽量不要在清单文件中添加任何额外内容。如果您需要使用功能,请尝试make required =“false”。考虑到有一些权限需要使用uses-feature标记,而其他权限则没有。在发布您的应用之前尝试阅读。这里有关[清单标签]的详细信息[2]尽量支持尽可能多的sdk。您可以在清单中将其设置为:尝试使用支持屏幕而不是使用兼容屏幕标记。它至少对我有用!

 <supports-screens
   android:xlargeScreens="true"
   android:largeScreens="true"
   android:normalScreens="true"
   android:smallScreens="true"
   android:anyDensity="true"
   /> I hope they will be helpful for you too! Here the fixed version of my application manifest;

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
<supports-screens
   android:xlargeScreens="true"
   android:largeScreens="true"
   android:normalScreens="true"
   android:smallScreens="true"
   android:anyDensity="true"
   />    <uses-permission android:name="android.permission.BLUETOOTH" />    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />    <uses-feature android:name="android.hardware.bluetooth" android:required="false"/>    <uses-permission    android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission    android:name="android.permission.READ_EXTERNAL_STORAGE"   />
   <uses-feature android:name="android.hardware.Sensor" android:required="false"/>

 [1]: http://developer.android.com/google/play/filters.html   [2]:    http://developer.android.com/guide/topics/manifest/uses-feature-element.html#permissions

#1


1  

Remove tag, and add just support screen tag as below,

删除标记,并添加支持屏幕标记,如下所示,

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

Hope this helps you.

希望这对你有所帮助。

#2


0  

Remove <compatible-screens >

or

要么

Put below code and try

放在下面的代码并尝试

 <screen android:screenSize="normal" android:screenDensity="ldpi" />
    <screen android:screenSize="normal" android:screenDensity="mdpi" />
    <screen android:screenSize="normal" android:screenDensity="hdpi" />
    <screen android:screenSize="normal" android:screenDensity="xhdpi" />
<screen android:screenSize="normal" android:screenDensity="xxhdpi" />

#3


0  

Thank you All, I want to sum up things I learned by encountering with this problem. The properties given in manifest files with the tags like supports-screens, uses-sdk or uses-feature are actually filters of google play. You can find more details in this [link][1]: Basically, filters are given in the manifest file and they decide which devices will be compatible or not compatible. In order to support as much as device possible, I suggest you to keep your manifest filters simple ; Except then necessary permissions or features, try not to add anything extra to the manifest file. If you need to use feature, try make required="false". Consider the fact there are some permissions requires uses-feature tag to be used and there are other permissions don't. Try to read about before publishing your app. Here detailed information about [manifest tags][2] Try to support as many sdk's as possible. You can set it in the manifest like this: Try to use supports-screens rather than using compatible-screens tag. It worked for me at least!

谢谢大家,我想总结一下我遇到这个问题所学到的东西。清单文件中提供的属性(如支持屏幕,uses-sdk或uses-feature)实际上是Google Play的过滤器。您可以在[link] [1]中找到更多详细信息:基本上,过滤器在清单文件中给出,它们决定哪些设备兼容或不兼容。为了尽可能多地支持设备,我建议您保持简单过滤器的简单;除了必要的权限或功能之外,请尽量不要在清单文件中添加任何额外内容。如果您需要使用功能,请尝试make required =“false”。考虑到有一些权限需要使用uses-feature标记,而其他权限则没有。在发布您的应用之前尝试阅读。这里有关[清单标签]的详细信息[2]尽量支持尽可能多的sdk。您可以在清单中将其设置为:尝试使用支持屏幕而不是使用兼容屏幕标记。它至少对我有用!

 <supports-screens
   android:xlargeScreens="true"
   android:largeScreens="true"
   android:normalScreens="true"
   android:smallScreens="true"
   android:anyDensity="true"
   /> I hope they will be helpful for you too! Here the fixed version of my application manifest;

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
<supports-screens
   android:xlargeScreens="true"
   android:largeScreens="true"
   android:normalScreens="true"
   android:smallScreens="true"
   android:anyDensity="true"
   />    <uses-permission android:name="android.permission.BLUETOOTH" />    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />    <uses-feature android:name="android.hardware.bluetooth" android:required="false"/>    <uses-permission    android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission    android:name="android.permission.READ_EXTERNAL_STORAGE"   />
   <uses-feature android:name="android.hardware.Sensor" android:required="false"/>

 [1]: http://developer.android.com/google/play/filters.html   [2]:    http://developer.android.com/guide/topics/manifest/uses-feature-element.html#permissions