Сбой сборки с исключением: выполнение задачи не выполнено: app: transformClassesWithMultidexlistForDebug - PullRequest
0 голосов
/ 25 января 2019

У меня проблемы с выполнением проекта, я только что загрузил проект из git, но кажется, что он не работает с версией моей Android Studio. Проект был создан в версии Android, скомпилированной в SDK 27 *.

Я пробовал много разных решений, но ничего не получалось. Это то, что я уже пробовал:

  1. Изменить версию компиляции

Изменить compileSdkVersion на 28

  1. Установить для библиотеки dexOption значение false

Добавить dexOption для библиотек

dexOptions {
        preDexLibraries = false
    }
  1. Выполните тест androidDependencies для Gradle, и он успешно собран.

Как я уже говорил, ничего из этого не сработало, но я обнаружил проблему с запуском теста сборки.

enter image description here

И тест дал мне эту ошибку:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list.

Итак, это мои файлы graddle:

build.gradle

buildscript {

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


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

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }

    }
}

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

build.gradle (Модуль: приложение)

apply plugin: 'com.android.application'
android {
    compileSdkVersion 'android-28'
    useLibrary  'org.apache.http.legacy'
    defaultConfig {
        applicationId "myIdApplication"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
repositories {
    jcenter()
    google()
    maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
    maven { url 'https://jitpack.io' }
}
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:support-v4:27.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.github.chrisbanes:PhotoView:latest.release'
    implementation 'com.android.support:animated-vector-drawable:27.1.1'
    implementation('com.mikepenz:materialdrawer:5.9.1@aar') { transitive = true }
    implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever:1.0.14'
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.jakewharton:butterknife:8.8.1'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation 'com.twitter.sdk.android:twitter:3.1.1'
    implementation 'com.twitter.sdk.android:twitter-core:3.1.1'
    implementation 'com.twitter.sdk.android:tweet-ui:3.1.1'
    implementation 'com.android.support:recyclerview-v7:27.1.0'
    implementation 'com.hendraanggrian:recyclerview-paginated:0.6'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'com.android.support:design:27.1.1'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'commons-codec:commons-codec:1.11'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'
    implementation 'com.synnapps:carouselview:0.1.4'
    implementation 'bg.devlabs.fullscreenvideoview:library:0.0.8'
    implementation 'com.github.halilozercan:BetterVideoPlayer:1.2.alpha1'
    implementation 'com.github.ybq:Android-SpinKit:1.1.0'
    implementation 'com.mindorks.android:prdownloader:0.4.0'
    testImplementation 'junit:junit:4.12'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.android.support:exifinterface:27.1.1'

}

У меня есть гугл этот вопрос в течение нескольких дней, и ничего не работает. Заранее спасибо.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...