【问题标题】:Could not resolve all task dependencies for configuration ':unimodules-react-native-adapter:debugCompileClasspath',无法解析配置 ':unimodules-react-native-adapter:debugCompileClasspath' 的所有任务依赖项,
【发布时间】:2019-11-28 12:23:23
【问题描述】:

此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 5.0 不兼容。 使用“--warning-mode all”显示各个弃用警告。 见https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings

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

  • 出了什么问题: 无法确定任务“:unimodules-react-native-adapter:compileDebugAidl”的依赖关系。

    无法解析配置 ':unimodules-react-native-adapter:debugCompileClasspath' 的所有任务依赖项。 无法解析 androidx.core:core:1.0.0。 要求: 项目:unimodules-react-native-adapter 找不到满足版本约束的“androidx.core:core”版本:

  Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.github.bumptech.glide:glide:4.9.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.facebook.react:react-native:0.61.5' --> 'androidx.appcompat:appcompat:1.0.2' --> 'androidx.core:core:1.0.1'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.github.bumptech.glide:glide:4.9.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.github.bumptech.glide:glide:4.9.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.legacy:legacy-support-core-utils:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.github.bumptech.glide:glide:4.9.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.github.bumptech.glide:glide:4.9.0' --> 'androidx.vectordrawable:vectordrawable-animated:1.0.0' --> 'androidx.vectordrawable:vectordrawable:1.0.1' --> 'androidx.core:core:1.0.0'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.facebook.react:react-native:0.61.5' --> 'androidx.appcompat:appcompat:1.0.2' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.github.bumptech.glide:glide:4.9.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.customview:customview:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.github.bumptech.glide:glide:4.9.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.viewpager:viewpager:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.github.bumptech.glide:glide:4.9.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.coordinatorlayout:coordinatorlayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.github.bumptech.glide:glide:4.9.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.drawerlayout:drawerlayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.github.bumptech.glide:glide:4.9.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.slidingpanelayout:slidingpanelayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.github.bumptech.glide:glide:4.9.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.github.bumptech.glide:glide:4.9.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.asynclayoutinflater:asynclayoutinflater:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'androidx.core:core' strictly '1.0.0' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'androidx.core:core' strictly '1.0.0' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'androidx.core:core' strictly '1.0.0' because of the following reason: debugRuntimeClasspath uses version 1.0.0

无法解析 androidx.vectordrawable:vectordrawable:1.0.0。 要求: 项目:unimodules-react-native-adapter 找不到满足版本约束的“androidx.vectordrawable:vectordrawable”版本:

 Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.github.bumptech.glide:glide:4.9.0' --> 'androidx.vectordrawable:vectordrawable-animated:1.0.0' --> 'androidx.vectordrawable:vectordrawable:1.0.0'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.facebook.react:react-native:0.61.5' --> 'androidx.appcompat:appcompat:1.0.2' --> 'androidx.vectordrawable:vectordrawable:1.0.1'
           Dependency path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'com.facebook.react:react-native:0.61.5' --> 'androidx.appcompat:appcompat:1.0.2' --> 'androidx.vectordrawable:vectordrawable-animated:1.0.0' --> 'androidx.vectordrawable:vectordrawable:1.0.0'
           Constraint path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'androidx.vectordrawable:vectordrawable' strictly '1.0.0' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'androidx.vectordrawable:vectordrawable' strictly '1.0.0' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'org.unimodules:unimodules-react-native-adapter:4.0.0' --> 'androidx.vectordrawable:vectordrawable' strictly '1.0.0' because of the following reason: debugRuntimeClasspath uses version 1.0.0

17 秒后构建失败

at checkExecSyncError (child_process.js:621:11)
at execFileSync (child_process.js:639:15)
at runOnAllDevices (E:\A\gamma\reactapp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at processTicksAndRejections (internal/process/task_queues.js:93:5)

【问题讨论】:

    标签: react-native debugging dependencies


    【解决方案1】:

    作为临时解决方案:

    • 打开node_modules/unimodules-react-native-adapter/android/build.gradle

    • 搜索compileOnly('com.facebook.react:react-native:+')

    • 改成implementation('com.facebook.react:react-native:+')

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-16
      • 2016-02-14
      • 2014-11-17
      • 2016-10-31
      • 2017-03-17
      相关资源
      最近更新 更多