代码之家  ›  专栏  ›  技术社区  ›  Pondikpa Tchabao

颤振:格拉德尔问题

  •  1
  • Pondikpa Tchabao  · 技术社区  · 6 年前

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    
    Execution failed for task ':app:preDebugBuild'.
    
    
    
    > Android dependency 'com.android.support:support-v4' has different 
    version for the compile (26.1.0) and runtime (27.1.1) classpath. You 
    should manually set the same version via DependencyResolution
    
    
    * Try:
    
    Run with --stacktrace option to get the stack trace. Run with --info or 
    --debug option to get more log output. Run with --scan to get full 
    insights.
    
    
    * Get more help at https://help.gradle.org
    
    
    BUILD FAILED in 0s
    

    我试图通过添加

    subprojects {
    project.configurations.all {
       resolutionStrategy.eachDependency { details ->
           if (details.requested.group == 'com.android.support'
                   && !details.requested.name.contains('multidex') ) {
               details.useVersion "26.1.0"
           }
       }
    }
    }
    

    已完成,但出现错误:Gradle task assembleDebug失败,退出代码为1

    0 回复  |  直到 6 年前
        1
  •  0
  •   Paraskevas Ntsounos Charith Lakshitha    4 年前

    Android依赖com.Android。support:support-v4“已经 不同的