【问题标题】:Why is my Android App unsupported for ALL devices on google play?为什么 google play 上的所有设备都不支持我的 Android 应用程序?
【发布时间】:2015-10-23 08:09:30
【问题描述】:

我在 google play store 上发布了一个 Android 应用,但它说它与所有设备都不兼容:



这是为什么?就在此之前,我发布了另一个应用程序,它与这个应用程序并没有太大区别,但它几乎兼容所有设备。

这是我的清单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.xxx.yy" >

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:name=".MyApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:theme="@style/app"
            android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <!-- register our ContentProvider -->
        <provider
            android:name=".data.app"
            android:authorities="@string/content_authority"
            android:exported="false"
            android:syncable="true" />

        <activity
            android:name=".DetailActivity"
            android:label="@string/title_activity_detail"
            android:parentActivityName=".FavoritesActivity"
            android:launchMode="singleTask">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xxx.yyy.MainActivity" />
>
        </activity>
        <activity
            android:name=".FavoritesActivity"
            android:label="@string/title_activity_favorites"
            android:parentActivityName=".MainActivity"
            android:launchMode="singleTask">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.xxx.yyy.MainActivity" />
        </activity>
    </application>

</manifest>

这是我的 gradle.build 文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.xxx.yy"
        minSdkVersion 10
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.android.support:support-v4:22.2.0'
    compile 'org.json:json:20150729'
    compile 'org.apache.directory.studio:org.apache.commons.codec:1.8'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
    compile 'com.android.support:design:22.2.0'
}

我真的迷路了,因为我只有一个权限,INTERNET..

【问题讨论】:

    标签: android google-play


    【解决方案1】:

    我找到了罪魁祸首!

    这是我的 gradle 文件中的这一行:

    compile 'org.apache.directory.studio:org.apache.commons.codec:1.8'

    这个奇怪的东西:Native platforms 之所以出现,是因为 gradle 依赖!

    这对我来说没有意义......我想我必须找到另一个依赖项或其他东西。有人可以向我解释为什么这样的依赖会导致这种情况发生吗?

    我删除了该行,在重新上传我的 APK 后,我现在看到了:

    【讨论】:

      【解决方案2】:

      您的清单中似乎有一个额外的&gt; --

                  <meta-data
                      android:name="android.support.PARENT_ACTIVITY"
                      android:value="com.xxx.yyy.MainActivity" />
      >   <==== DELETE THIS
              </activity>
              <activity
      

      不知道为什么你甚至可以用它来构建,但我测试了一个类似的场景,它为我制作了一个 APK。我猜当您上传 .apk 时会混淆 google play 的设备兼容性解析。

      【讨论】:

      • 哇,感谢您注意到这一点,但我测试了它,这不是问题!请看下面我的回答。感谢您的关注!!
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-12
      • 1970-01-01
      • 2019-03-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多