0

we are the developers of TourisMap. We don't understand why after the upload of our apk on the Google Play Developer Console we have 0 devices supported. Our personal thought is the Manifest and the build.gradle are ok: we can produce apk, than we can distribuite it to our beta tester without problems. Can you help us? Where is our error here, in your opinion?

AndroidManifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.caronteconsulting.tourismap"
    android:versionName="@string/version">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<supports-screens android:largeScreens="true"
    android:normalScreens="true" android:smallScreens="true"
    android:anyDensity="true"></supports-screens>
<uses-sdk android:minSdkVersion="13" android:targetSdkVersion="13" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
    <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="asd"/>
    <activity
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:name=".MainActivity"
        android:label="@string/app_name" >
    </activity>

    <activity
        android:name=".SplashActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>

build.gradle (app)

    apply plugin: 'com.android.application'

    android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.caronteconsulting.tourismap"
        minSdkVersion 13
        targetSdkVersion 13
        versionCode 1
        versionName "1.0"
}
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig getSigningConfig()
            applicationVariants.all { variant ->
                variant.outputs.each { output ->
                    def date = new Date();
                    def formattedDate = date.format('yyyyMMddHHmmss')
                    def newName = output.outputFile.name
                    newName = newName.replace("app-", "TourisMap-")
                    newName = newName.replace("-release", "-release" + formattedDate)
                    output.outputFile = new File(output.outputFile.parent, newName)
                }
            }
        }
    }
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'

}

2 Answers2

1

Set the targetSdkVersion to 23.

Not Gabriel
  • 531
  • 4
  • 13
  • At the same time, he should set compileSdkVersion to 23 as well (unless he has a specific reason not to). – Stephan Branczyk Oct 23 '15 at 20:35
  • So i have to set this: android { compileSdkVersion 23 buildToolsVersion "23.0.1" [...] Is it right? – Caronte Consulting Oct 26 '15 at 15:39
  • If I set targetSdkVersion: 23 I have this app not compatible with android 4.x devices, right? – Caronte Consulting Oct 26 '15 at 15:50
  • It will be compatible. Setting the targetSdkVersion to 23 simply means you will be able to use newer libraries to use with newer versions of android. Basically, when you set targetSdkVersion higher than your minSdkVersion, what you are saying is: "My app is for version 23, but we provide backwards compatibility all the way down to version 13." – Not Gabriel Oct 26 '15 at 16:40
  • THIS is an answer. Thx Not Gabriel, we'll insert your name in our credits to thank you for your help. – Caronte Consulting Oct 27 '15 at 15:44
  • Too much happiness: nothing changed... We don't know why... 0 devices also with 23 – Caronte Consulting Oct 27 '15 at 18:13
  • Can you try to remove the meta-data tag? Both of them... then upload again. – Not Gabriel Oct 27 '15 at 18:29
  • We did this but we have 2 error about: these tags are connected to map services and google services. We can't remove because the app will not works. Maybe the problem isn't in the Manifest? – Caronte Consulting Oct 28 '15 at 09:36
  • Maybe can we communicate with Play Store Staff to solve that? Is there a specific form for that? We only find the number for aftermarket problems – Caronte Consulting Oct 28 '15 at 10:36
  • I really don't know... maybe the problem is in the build.grade file... I don't know about contact information of the Google Play Staff, sorry. – Not Gabriel Oct 28 '15 at 11:39
1

We found the problem. Thanks to the indications here, we found the line that generates 0 devices into build.gradle :

dependencies {

  [...]

  compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
}

We use that lib to acquire strings in UTF-8. We delete our dependencies from org.apache.commons.io, than we delete the line:

compile 'org.apache.directory.studio:org.apache.commons.io:2.4'

from the build.gradle, we compile and upload on Google Play... Tadaaaa! 8233 devices. Why this happens? We don't know: Android Studio adds this line when you use Apache.Commons.IO functions and Google Play does not recognizes this lib... boh! Thanks for the help guys.

Community
  • 1
  • 1
  • So there is no way to support this? – neobie Feb 06 '16 at 14:43
  • Hi, I found another post [this](http://stackoverflow.com/questions/32747357/play-store-says-my-app-is-supported-by-0-devices-no-devices-are-compatible-wit) where a user says to change the path of the lib you want to compile. I try it as suggested but Android Studio doesn't find the path. If you use only one function of this lib, I suggest you to write your own function to avoid the problem and move on (I know: this is a trick, not the correct way to solve the problem...) – Caronte Consulting Feb 08 '16 at 17:12
  • change it to compile 'commons-io:commons-io:2.4' as mention here http://stackoverflow.com/a/32747437/376952 – xar Dec 23 '16 at 22:37