【问题标题】:minSdkVersion not working?minSdkVersion 不工作?
【发布时间】:2016-10-23 03:57:25
【问题描述】:

我正在按照我能找到的所有说明进行操作,并做了看似正确的事情,并设置了 compileSdkVersion 23targetSdkVersion 23minSdkVersion 15 以支持旧版本的 Android。

但一位 Beta 版测试人员报告说,它不会安装在他的手机上,因为它说他的 Android 版本不兼容。但他正在运行 Lollipop 5.1.1,即 API 22。那么为什么它不起作用呢?这是我的 gradle 配置(我的本地依赖项也同样配置)。

apply plugin: 'com.android.application'

android {
    signingConfigs {
        config {
            keyAlias 'config'
            keyPassword 'xxxxx'
            storeFile file('/home/xxxxx/android.jks')
            storePassword 'xxxxx'
        }
    }
    compileSdkVersion 23
    buildToolsVersion "23.0.3"
    defaultConfig {
        applicationId 'tabcomputing.tcwallpaper'
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 13
        versionName "1.1.3"
        signingConfig signingConfigs.config
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.config
        }
    }
   productFlavors {
   }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    // local libraries
    compile project(':library.clock')
    compile project(':library.color')
    compile project(':library.paper')
    // android libraries
    compile 'com.android.support:appcompat-v7:23.+'
    compile 'com.android.support:support-v4:23.+'
    compile 'com.android.support:design:23.+'
    testCompile 'junit:junit:4.12'
}

【问题讨论】:

    标签: android android-studio android-gradle-plugin android-library


    【解决方案1】:

    尝试安装最新版本的 Android Studio 并更新到compileSdkVersion 25

    在 Gradle 中更改这些行:

    compileSdkVersion 25
    minSdkVersion 15
    targetSdkVersion 25
    compile 'com.android.support:appcompat-v7:25.0.0'
    

    【讨论】:

    • @Swordsman 已经出来了,我只是把它放在我的应用程序中并重新上传到应用程序商店。
    • 它是几天前发布的,最新的是 api 25
    • @trans 多次尝试将您的库设置为最新版本也会导致错误
    • 好吧,我更新到最新版本的 Android Studio 并将我的版本更改为 25,重新构建并上传新的 APK。我花了一段时间才让应用程序最终推出到 Google Play,但它已经启动了......不。同样的问题。我的 beta 测试人员刚刚报告说他的手机仍然不兼容。
    【解决方案2】:

    好吧,答案似乎是我的 Beta 测试人员的手机不支持动态壁纸。这是一款三星 Galaxy Core Prime——一款非常基本的手机。奇怪的是确实安装了一些其他壁纸应用程序,但我认为它们一定是在以某种方式解决缺少动态壁纸 API 的问题,也许它们只是聪明的动画 gif。我不知道。我将不得不更多地研究它。如果有人知道,请告诉。

    【讨论】:

      猜你喜欢
      • 2021-07-05
      • 1970-01-01
      • 2017-04-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-19
      • 2015-03-23
      • 2016-10-05
      相关资源
      最近更新 更多