JJ Stamp
JJ Stamp

Reputation: 131

Android app showing incompatible after publishing

I have just tried to publish my first app but when it finally went through it was shown as being incompatible to multiple devices, I have been searching and every fix that I have come across has done nothing for me. Any suggestions?

Manifest

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

    <uses-feature
        android:name="android.hardware.camera2"
        android:required="true" />

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

    <application
        android:allowBackup="true"
        android:icon="@drawable/cls"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainPage"
            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=".OldLocation"
            android:label="@string/title_activity_old_location" >
        </activity>
        <activity
            android:name=".NewLocation"
            android:label="@string/title_activity_new_location" >
        </activity>
        <activity
            android:name=".RoomDescription"
            android:label="@string/title_activity_room_description" >
        </activity>
        <activity
            android:name=".FixtureDescription"
            android:label="@string/title_activity_fixture_description" >
        </activity>
        <activity
            android:name=".RoomList"
            android:label="@string/title_activity_room_list" >
        </activity>
        <activity
            android:name=".Summary"
            android:label="@string/title_activity_summary" >
        </activity>
    </application>

</manifest>

Gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.customledsupply.ledaudit"
        minSdkVersion 19
        targetSdkVersion 22
        versionCode 2
        versionName "2.0"
    }
    signingConfigs {
        release {
            storeFile file("myreleasekey.keystore")
            storePassword "CLS"
            keyAlias "Custom LED Supply"
            keyPassword "CLS"
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'io.realm:realm-android:0.82.0'
}

Upvotes: 0

Views: 123

Answers (2)

Hussein El Feky
Hussein El Feky

Reputation: 6707

In your AppManifest.xml, you added a feature that is not be supported by all devices which is android:name="android.hardware.camera2". It only supports API 21+. However, you can set the required attribute to false, but that will cause issues for your app.

Reference Link: https://developer.android.com/reference/android/hardware/camera2/package-summary.html

Upvotes: 0

Shobhit Puri
Shobhit Puri

Reputation: 26017

Most probably, the potential cause is the following:

<uses-feature
    android:name="android.hardware.camera2"
    android:required="true" />

If any device doesn't have this feature, it wont even show it on the play store for them and will be in your list of incompatible devices. If you want to make it optional, use android:required="false" instead. By doing thing, you might be able to get around the issue.

Otherwise if you give examples of the incompatible devices, we might be able to narrow down the issue more. Hope it helps.

Upvotes: 1

Related Questions