简体   繁体   中英

Why is my Android App unsupported for ALL devices on google play?

I published an Android app on the google play store but it says that it is incompatible with ALL devices:

在此处输入图片说明


在此处输入图片说明


在此处输入图片说明

Why is this? Just before this, I published another app and it really wasn't that much different from this one but it is compatible with almost all devices.

This is my manifest:

<?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>

And this is my gradle.build file:

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'
}

I'm really lost here because I only have one permission, INTERNET..

I found out the culprit!

It was this line in my gradle file:

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

This weird: Native platforms thing was showing up before all because of that gradle dependency!

Which does not make sense for me... I guess I have to find another dependency or something. Could someone explain to me why a dependency like that would cause this to happen?

I removed that line and upon reuploading my APK I now see this:

在此处输入图片说明

You appear to have an extra > in your manifest --

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

Not sure why your even able to make a build with that, but I tested a similar scenario and it made an APK for me. I would guess when you upload the .apk that is messing with google play's parsing for device compatibility.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM