Androidstudio编译的App5.几系统上能运行,4.4系统上不行,闪屏就退了求大神们指教

这是我 gradle

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
useLibrary 'org.apache.http.legacy'

sourceSets {
    main {
        jniLibs.srcDirs = ['libs']
    }
}

/* 。。。。。。。。。*/

//签名
signingConfigs {
    debug {

    }
    release {// 自己的签名文件
        storeFile file("E:\\Apk\\jklc.jks")
        storePassword "123456"
        keyAlias "jklc"
        keyPassword "123456"
    }
}
defaultConfig {
    applicationId "com.jklc.healthyarchives"
    minSdkVersion 16
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
}


buildTypes {
    debug {
        // 显示Log
        buildConfigField "boolean", "LOG_DEBUG", "true"
        versionNameSuffix "-debug"
        minifyEnabled false
        zipAlignEnabled false
        shrinkResources false
        signingConfig signingConfigs.debug
    }







    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.alibaba:fastjson:1.2.10'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.facebook.fresco:fresco:0.12.0'
compile 'com.jakewharton:butterknife:5.1.1'
compile files('libs/httpmime-4.1.1.jar')
compile files('libs/Sunflower.jar')
}

Androidstudio 可以看到错误日志的,看一下就知道什么问题了,一般都是使用了高版本的Api导致的

因为你用了高版本API的某些方法在低版本API里不存在,所以你用高版本API发布之后在低版本Android运行就会闪退。你可以下载低版本的API,然后将targetSdkVersion 指定到低版本,看看代码里有什么地方报错的,把它改成兼容的方式就行了。

可能在你的代码中存在某些代码片不支持在低版本运行