我想我已经把我的朋友搞砸了。应用程序只在牛轧糖上运行,即使是针对棉花糖或更低......

时间:2018-05-01 05:32:12

标签: android android-studio android-gradle

如果我降低更多,则显示错误...即使降低编译sdk,也可以说某些依赖关系仅适用于nougat

apply plugin: 'com.android.application'

android
{
compileSdkVersion 25
buildToolsVersion '27.0.2'
defaultConfig {
    applicationId "com.example.admin.clicknorder"
    minSdkVersion 21
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    vectorDrawables.useSupportLibrary = true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
productFlavors {
}
 }

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
compile 'com.cepheuen.elegant-number-button:lib:1.0.2'
//compile 'com.android.support:design:25.0.0'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-core:10.2.0'
compile 'com.google.firebase:firebase-database:10.2.0'
compile 'info.hoang8f:fbutton:1.0.5'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.firebaseui:firebase-ui-database:1.2.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.3.1'
}
apply plugin: 'com.google.gms.google-services'

如果需要更多信息,我将编辑我的问题

1 个答案:

答案 0 :(得分:0)

你只针对21到23的3个设备。这真是一个坏主意。在下面更换您的平板。如果不可用,您需要安装27个版本(最新版本)。

如果没有,请关闭gradle offline模式。 how to turn off gradle offline mode.

apply plugin: 'com.android.application'

android
        {
            compileSdkVersion 27
            buildToolsVersion '27.0.2'
            defaultConfig {
                applicationId "com.example.admin.clicknorder"
                minSdkVersion 15
                targetSdkVersion 27
                versionCode 1
                versionName "1.0"
                testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
                vectorDrawables.useSupportLibrary = true
            }
            buildTypes {
                release {
                    minifyEnabled false
                    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                }
            }
            productFlavors {
            }
        }

def SUPPORT_LIB_VER = '27.0.2'
def FIREBASE_VER = '11.8.0'


dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile "com.android.support:appcompat-v7:$SUPPORT_LIB_VER"
    compile "com.android.support:cardview-v7:$SUPPORT_LIB_VER"
    compile "com.android.support:recyclerview-v7:$SUPPORT_LIB_VER"
    compile "com.android.support:design:$SUPPORT_LIB_VER"
    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
    compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
    compile 'com.cepheuen.elegant-number-button:lib:1.0.2'
//compile 'com.android.support:design:25.0.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile "com.google.firebase:firebase-core:$FIREBASE_VER"
    compile "com.google.firebase:firebase-database:$FIREBASE_VER"
    compile 'info.hoang8f:fbutton:1.0.5'
    compile 'com.rengwuxian.materialedittext:library:2.1.4'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.firebaseui:firebase-ui-database:1.2.0'
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'