gpt4 book ai didi

android - Android 主项目 build.gradle 中的插件部分和缺少的模块

转载 作者:行者123 更新时间:2023-12-03 05:30:02 25 4
gpt4 key购买 nike

  • 我收到以下错误:

  • BUILD FAILED in 56s ERROR: Plugin [id: 'de.undercouch.download'] was not found in any of the following sources:

    - Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
    - Plugin Repositories (plugin dependency must include a version number for this source)


    我想知道这个插件部分。

    我正在查看以下指南:

    Plugins in Android Gradle

    但它是零碎的,我想看看 build.gradle 文件的完整示例。

  • 如何在 "/nbproject" 中集成以下内容:

  • /@react-native-community/cli-platform-android/native_modules.gradle



    我只能看到路径中的以下文件夹:
    /@react-native-community/cli

  • 缺少 react-native-unimodules/nbproject .在这篇文章的最后是我的 settings.gradle:
    那么我应该使用什么命令来代替:

  • npm install


    //apply from: "../../node_modules/react-native-unimodules/gradle.groovy"
    apply from: "/Users/lion/Documents/Project/ReactNative/Libraries/rn_mac_kitchensync/node_modules/react-native-unimodules/gradle.groovy"
    include ':react-native-screens'
    project(':react-native-screens').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-screens/android')
    include ':react-native-reanimated'
    project(':react-native-reanimated').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-reanimated/android')
    include ':react-native-gesture-handler'
    project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
    //==
    include ':react-native-vector-icons'
    project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
    //
    include ':ReactAndroid'
    //
    project(':ReactAndroid').projectDir = new File(
    rootProject.projectDir, '../node_modules/react-native/ReactAndroid')
    //
    includeUnimodulesProjects()
    //includeUnimodules([
    // modulesPaths: ['../../node_modules']
    //])

    rootProject.name = 'NativebaseKitchenSink'

    include ':app'

    最佳答案

    plugins .此 block 通常属于顶部,但也可能出现在 build.gradle 的底部.对于 Android DSL,使用 apply plugin: "de.undercouch.download" 相当普遍或 apply from: "..." .对于 Gradle 插件,repositoriesclasspath总是需要在 buildscript 中定义堵塞。通常至少有 2 个 build.gradle GitHub上有示例。

    关于android - Android 主项目 build.gradle 中的插件部分和缺少的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59700923/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com