Supported Android devices: 0 devices

。_饼干妹妹 提交于 2019-12-02 14:58:00

问题


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'

}


回答1:


Set the targetSdkVersion to 23.




回答2:


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.



来源:https://stackoverflow.com/questions/33308560/supported-android-devices-0-devices

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!