错误:程序类型已经存在:android.support.v4.app.ActivityCompat $ OnRequestPermissionsResultCallback停留了很长时间

时间:2019-01-25 08:54:46

标签: android gradle error-handling android-gradle

我尝试了一些解决方案,但似乎都没有用。我第一次使用此依赖项,但我不理解此错误。我试图解决它。很多。但是似乎没有任何作用。作为一个新手,它更加令人困惑,我以前从未遇到过。有人可以帮我吗?  我的gradle文件:

项目:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1'


    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    google()
    jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

应用程序:

apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
    applicationId "com.example.kiit.myapplication"
    minSdkVersion 21
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner 
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:26.+'
implementation 'me.dm7.barcodescanner:zxing:1.9'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

0 个答案:

没有答案