【问题标题】:Failed to transform file 'linkedin-sdk-release.aar' to match attributes无法转换文件“linkedin-sdk-release.aar”以匹配属性
【发布时间】:2018-09-04 04:46:28
【问题描述】:

我正在尝试将 LinkedIn 集成到我的 Android 应用程序中并得到响应

无法解决依赖关系 ':app@debugAndroidTest/compileClasspath': 转换文件失败 'linkedin-sdk-release.aar' 匹配属性 {artifactType=android-exploded-aar} 使用变换 提取AarTransform

如果有人可以帮忙,请。

我的 buld.gradle 文件是

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "e.musalastborn.truckers1"
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        useLibrary 'org.apache.http.legacy'
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        cxxxxxxc
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

    }
    buildToolsVersion '28.0.0'
}

//dependencies added to the app.
dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.0.2'
    compile project(path: ':linkedin-sdk', configuration: 'default')
    compile 'com.android.volley:volley:1.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:design:27.0.2'
    implementation 'com.google.android.gms:play-services-maps:12.0.1'
    testImplementation 'junit:junit:4.12'
    compile 'com.firebase:firebase-jobdispatcher:0.6.0'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.google.android.gms:play-services-auth:12.0.1'
    compile 'com.google.maps:google-maps-services:0.1.7'
    compile 'org.slf4j:slf4j-nop:1.7.25'
    implementation 'com.google.android.gms:play-services-location:12.0.1'
    implementation 'com.facebook.android:facebook-login:[4,5)'

}

【问题讨论】:

  • 请分享您应用的build.gradle文件
  • @VicJodan,我刚刚分享了我的 gradle。请协助。
  • @Sufferer 你解决了吗...
  • @Tash Pemhiwa,不,我没有。这让我搁置了这个项目!

标签: android


【解决方案1】:

这个问题可能是在您使用linkedin-sdk-release.aar 进行一些更改后发生的。

就像我一样,我打开那个 aar 并删除一些目录,然后再将其包含在我的项目中。

虽然我对这个错误感到困惑,但我使用选项 --stacktrace 运行 gradlew

./gradlew :app:assembleDebug --stacktrace 输出是(省略了详细的轨迹跟踪):

```

任务:app:checkDebugClasspath 失败

FAILURE:构建失败并出现异常。

  • 出了什么问题: 无法解析配置 ':app:debugCompileClasspath' 的所有文件。

    使用转换 ExtractAarTransform 转换文件“mmkv-1.0.13.aar”以匹配属性 {artifactType=android-exploded-aar} 失败 java.lang.IllegalArgumentException:格式错误 ```

看到MALFORMED 关键字我注意到我的错,然后我提取原始aar 并像以前一样执行工作(删除一些目录),我重新压缩由zip 应用程序更改的(ubuntu 的默认压缩工具)。

当然错误消失了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-05-18
    • 1970-01-01
    • 1970-01-01
    • 2019-12-30
    • 2018-05-18
    • 2019-03-15
    • 2017-09-30
    • 2022-08-09
    相关资源
    最近更新 更多