首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >支持Android设备:0设备

支持Android设备:0设备
EN

Stack Overflow用户
提问于 2015-10-23 17:51:32
回答 2查看 2.8K关注 0票数 0

我们是TourisMap的开发人员。我们不明白为什么在Google Play Developer控制台上传我们的apk之后,我们支持0台设备。我们个人的想法是清单和build.gradle是好的:我们可以生产apk,而不是我们可以分发给我们的测试版测试人员没有问题。你能帮我们吗?在你看来,我们的错误在哪里?

AndroidManifest

代码语言:javascript
复制
<?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)

代码语言:javascript
复制
    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'

}

EN

回答 2

Stack Overflow用户

发布于 2015-10-23 18:03:27

targetSdkVersion设置为23。

票数 1
EN

Stack Overflow用户

发布于 2015-11-23 10:04:32

我们发现了问题。感谢here的指示,我们找到了将0设备生成到build.gradle中的行:

代码语言:javascript
复制
dependencies {

  [...]

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

我们使用这个lib来获取UTF-8中的字符串。我们从org.apache.commons.io中删除依赖项,而不是删除行:

代码语言:javascript
复制
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'

在build.gradle上,我们编译并上传到Google .8233台设备。为什么会发生这种事?我们不知道: Android在使用Apache.Commons.IO函数时添加了这一行,而Google不识别这个库.阿!谢谢你们的帮助。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33308560

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档