无法解析android中的com.androidAffected模块和com.loopjAffected模块

问题描述 投票:0回答:1

无法解析android中的com.androidAffected模块和com.loopjAffected模块。我检查了其他链接,但感到困惑。

下面是我的App构建文件

apply plugin: 'com.android.application'

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


dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:25.3.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'

    implementation 'com.android.support:cardview v7:25.3.1'
    implementation 'com.github.bumptech.glide:glide:3.6.1'
    implementation 'me.dm7.barcodescanner:zxing:1.8.4'
    implementation 'com.loopj.android:androidasync http:1.4.9'
    implementation 'com.google.code.gson:gson:2.6.2'
    implementation project(':merchantsdk')


    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'
}

MerchantSDK是导入到该项目中的aar文件,然后我构建了以下异常无法解析com.androidAffected模块和无法解析com.loopjAffected模块

请对此提供帮助。谢谢。

android build.gradle aar
1个回答
0
投票

如果是AAR文件,则可以将其保留为“ lib”文件夹。您可以在build.gradle中添加此AAR的依赖关系,如下所示:-

implementation "packagename of aar:aar filename:@aar"

替换软件包名称和AAR的文件名。

© www.soinside.com 2019 - 2024. All rights reserved.