如何解决依赖性?

时间:2019-07-27 06:39:31

标签: java android android-studio gradle

通过SVN REPO下载程序时出现此错误。

我尝试了干净的构建,然后重新构建,但这没有用。 我还尝试在调试下面添加此行,但这对我也不起作用。

innerTest {
        //...
        matchingFallbacks = ['debug', 'release']
    }

这是我的build.gradle(app)文件

buildscript {
repositories {
    maven { url 'https://maven.fabric.io/public' }
 }

 dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
 }
 }
 apply plugin: 'com.android.application'
 apply plugin: 'io.fabric'

 repositories {
 maven { url 'https://maven.fabric.io/public' }
 }


android {
signingConfigs {
    config {
        keyAlias 'cpt'
        keyPassword 'welcome123'
        storeFile file('C:/AndroidKey/CPT.jks')
        storePassword 'welcome123'
    }
}
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
    applicationId "com.comptianetwork"
    multiDexEnabled true
    minSdkVersion 17
    targetSdkVersion 28
    versionCode 12
    versionName "2.2"
    signingConfig signingConfigs.config
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 }
 compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
 }
 lintOptions {
    checkReleaseBuilds false
    // Or, if you prefer, you can continue to check for errors in release 
  builds,
    // but continue the build even when errors are found:
    abortOnError false
 }
 buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
  'proguard-rules.pro'
        shrinkResources true
        signingConfig signingConfigs.config
    }
    debug {
        signingConfig signingConfigs.config
    }
    innerTest {
        //...
        matchingFallbacks = ['debug', 'release']
    }
 }

 lintOptions {

    checkReleaseBuilds false

 }

 packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/ASL2.0'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LGPL2.1'
 }
 dexOptions {
    preDexLibraries = false
    javaMaxHeapSize "4g"
 }
 }

 dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
implementation project(':expandabletextview')
implementation project(':swipedeck')
implementation project(':materialProgressBar')
implementation project(':materialviewpagerindicator')
implementation project(':photoview')
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'commons-io:commons-io:2.5'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.facebook.android:facebook-android-sdk:4.39.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.material:material:1.1.0-alpha03'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
testImplementation 'junit:junit:4.12'
implementation 'org.apache.httpcomponents:httpcore:4.4.6'
implementation 'com.github.blackfizz:eazegraph:1.2.2@aar'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'me.relex:circleindicator:2.1.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'com.jakewharton:butterknife:9.0.0-rc2'
implementation 'org.greenrobot:eventbus:3.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.8@aar') {
    transitive = true
}
}

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

我得到的错误如下所示

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': 
Could not resolve project :materialviewpagerindicator.
Show Details
Affected Modules: app


ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': 
Could not resolve project :photoview.
Show Details
Affected Modules: app

0 个答案:

没有答案