【问题标题】:Android app suddenly not compatible with devicesAndroid 应用突然与设备不兼容
【发布时间】:2013-06-07 20:11:16
【问题描述】:

我有一个 Android 应用程序,它在 Google Play 商店中已经存在大约两年了 (https://play.google.com/store/apps/details?id=dkh.idex),API 级别为 7+,支持所有屏幕尺寸。它使用一些权限(ACCESS_NETWORK_STATE、INTERNET、READ_EXTERNAL_STORAGE、WRITE_EXTERNAL_STORAGE)。

2013 年 4 月 22 日,我上传了一个版本(版本代码 44),该版本在我的所有用户设备上都能正常运行。一个月后,2013 年 5 月 22 日,我上传了一个新版本,做了一些小改动(版本代码 45),但最近几天(从 5 月 27 日开始)很多用户向我抱怨他们的设备不再兼容我的应用程序的最新版本。这些用户已经使用该应用程序长达两年没有出现此类问题。一些设备仍然能够升级到最新版本,但其他设备在尝试升级时会收到他们的设备不兼容的消息(请注意,他们已经有旧版本的应用程序)。我能够直接通过 ADB (USB) 将应用程序安装在一个设备上,该设备说它与 Google Play 商店不兼容(三星 Galaxy Tab 10.1,旧版本)。

我查看了我的文件变更集,我在两个版本之间的 AndroidManifest.xml 中所做的唯一更改是更新版本代码和版本号。我没有更改任何使用权限、支持的屏幕尺寸、支持的 API 级别,甚至没有添加任何活动或更改调试设置。

这是我的 AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="dkh.idex"
  android:versionName="3.2.11" android:versionCode="45">

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

<uses-sdk android:minSdkVersion="7"/>

<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application android:name="dkh.classes.MyApp" android:label="@string/app_name"    android:debuggable="false" android:icon="@drawable/ic_launcher_idex_v3">
    <activity android:name=".idex"
              android:label="@string/app_name"
              android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".Form2"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:configChanges="orientation">

    </activity>
    <activity android:name=".InfoForm"
        android:label="@string/app_name"
        android:screenOrientation="portrait">

    </activity>
    <activity android:name=".INSTAForm"
        android:label="@string/app_name"
        android:launchMode="standard"
        android:screenOrientation="portrait">
    </activity>
    <activity android:name=".HygieneForm"
        android:label="@string/app_name"
        android:screenOrientation="portrait">

    </activity>
    <activity android:name=".CommentForm"
        android:label="@string/app_name"
        android:screenOrientation="portrait">

    </activity>
    <activity android:name=".AddReqChooseForm"
        android:label="@string/app_name"
        android:screenOrientation="portrait">

    </activity>
    <activity android:name=".AddReqForm"
        android:label="@string/app_name"
        android:screenOrientation="portrait">

    </activity>
    <activity android:name=".FTPForm" android:label="@string/app_name" android:screenOrientation="portrait"></activity>
    <activity android:name=".SyncForm" android:label="@string/app_name" android:screenOrientation="portrait"></activity>
    <activity android:name=".DrawTestForm" android:label="@string/app_name"  android:configChanges="keyboardHidden|orientation"></activity>
    <activity android:name="StatisticsForm" android:screenOrientation="portrait" android:label="@string/app_name"></activity>
    <activity android:name="PhotoGallery" android:screenOrientation="portrait" android:label="@string/app_name"></activity>
    <activity android:name="PhotoView" android:label="@string/app_name"></activity>
    <activity android:name="ParametersForm" android:label="@string/app_name" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan"></activity>
    <activity android:name="PropertiesForm" android:label="@string/app_name" android:screenOrientation="portrait" android:windowSoftInputMode="adjustPan"></activity>
    <activity android:screenOrientation="portrait" android:name="InspectionChangeForm" android:label="@string/app_name"></activity>
    <activity android:name="AdvancedSyncWindow" android:label="@string/app_name" android:screenOrientation="portrait"></activity>
    <service android:process=":image_process" android:name=".ImageUploadService"></service>
    <activity android:name=".HelpWindow" android:label="@string/app_name"></activity>
    <activity android:name="RecoverView"></activity>
    <activity android:name="InspectionCommentForm" ></activity>

</application>
</manifest> `

在我的其余代码中,我在资源文件中添加了一些文本并进行了一些标准的小改动,但应用程序中没有以某种形式存在的内容。

我真的对这个问题感到困惑。有谁知道这可能是什么原因,或者知道谷歌是否改变了任何可能对此产生影响的东西?如果您需要更多信息,请询问。

【问题讨论】:

  • 我无法解释为什么这个问题最近才出现,但您的 supports-screens 元素中缺少 android:xlargeScreens,这可能是相关的。
  • @cloudymusic 我认为android:anyDensity 会处理所有丢失的屏幕尺寸?您可能正在做某事,但奇怪的是在那之前它没有成为问题。
  • @Rick77 似乎他们还建议将 xlargeScreens 添加到清单中,但是,以前这不是问题。不过以后我会试试的
  • @Daniel 请记住,密度与屏幕尺寸不同。 :)

标签: android google-play


【解决方案1】:

我解决了。

问题在于 Google Play 将根据设备屏幕大小过滤应用程序,并且由于 API 7(2.1 版)不支持 xlargeScreens,因此这些设备上的过滤器将设置为 false。 直到 5 月底才强制执行。我的应用在完全相同的规范上运行了两年,但我怀疑 Google Play 已经进行了更新以强制执行此限制。

解决方案:如果您有一个为 API 7 开发的应用,但您希望它在 xlargeScreens 设备上可用,则必须在清单中进行设置

<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="9" />

如果 minSdkVersion 或 targetSdkVersion 为 9 或更大,Google Play 将允许 xlargeScreen 设备查看您的应用。

【讨论】:

    猜你喜欢
    • 2011-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-13
    相关资源
    最近更新 更多