【问题标题】:Failed to resolve: multidex Open File Failed to resolve: runtime Open File Failed to resolve: common Open File解析失败:multidex 打开文件 解析失败:运行时打开文件 解析失败:common 打开文件
【发布时间】:2018-06-11 10:24:01
【问题描述】:

解析失败:multidex

打开文件

无法解决:运行时 打开文件

无法解决:常见 打开文件 ##

这是Android工作室的错误

—————————————————下面是我的模块Build.gradle

apply plugin: 'com.android.application'
apply plugin: 'com.jakewharton.butterknife'


android {
    compileSdkVersion 26
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "com.wlkj.ciyun"
        minSdkVersion 17
        targetSdkVersion 26
        versionCode 2
        versionName "2.0.1"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

    lintOptions {
        disable "ResourceType"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dexOptions {
        jumboMode true
    }

    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.+'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.jakewharton:butterknife:8.4.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
    implementation 'jp.wasabeef:glide-transformations:2.0.1'
    implementation 'org.kymjs.kjframe:kjframe:2.6'
    implementation 'com.google.code.gson:gson:2.8.0'
    implementation 'com.squareup.retrofit2:retrofit:2.1.0'
    implementation 'com.squareup.okhttp3:okhttp:3.4.2'
    implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
    implementation 'com.squareup.retrofit2:converter-scalars:2.0.0'
    implementation files('libs/core-3.1.0.jar')
    implementation project(':pulltorefresh')
    implementation files('libs/android-support-multidex.jar')
    implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'

}

求大佬指点----谢谢

【问题讨论】:

标签: resolve


【解决方案1】:

在项目build.gradle中

allprojects {
    repositories {
        /**
         * This must be at the top.
         */
        maven {
            url 'https://maven.google.com'
        }
        // Others 
        maven { url "..." }
        jcenter()
        mavenCentral()
        google()
    }
}

【讨论】:

    猜你喜欢
    • 2016-03-06
    • 1970-01-01
    • 1970-01-01
    • 2012-05-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-02
    相关资源
    最近更新 更多