使用gradle android插件收集依赖项

使用gradle android插件收集依赖项,android,gradle,Android,Gradle,在GradleAndroid项目中,是否可以将所有依赖项作为jar文件收集到一个地方 我尝试使用: 但Gradle返回错误: Could not find property 'testRuntime' on configuration container. testRuntime是一种在您的项目中似乎不可用的配置。要在单个文件夹中收集所有配置,可以执行以下操作: task collectJars(type: Copy){ into "$buildDir/output/lib"

在GradleAndroid项目中,是否可以将所有依赖项作为jar文件收集到一个地方

我尝试使用:

但Gradle返回错误:

Could not find property 'testRuntime' on configuration container.

testRuntime是一种在您的项目中似乎不可用的配置。要在单个文件夹中收集所有配置,可以执行以下操作:

task collectJars(type: Copy){
    into "$buildDir/output/lib"
    configurations.all{ config ->
        from config
    }
}

testRuntime是一种在您的项目中似乎不可用的配置。要在单个文件夹中收集所有配置,可以执行以下操作:

task collectJars(type: Copy){
    into "$buildDir/output/lib"
    configurations.all{ config ->
        from config
    }
}

testRuntime是一种在您的项目中似乎不可用的配置。要在单个文件夹中收集所有配置,可以执行以下操作:

task collectJars(type: Copy){
    into "$buildDir/output/lib"
    configurations.all{ config ->
        from config
    }
}

testRuntime是一种在您的项目中似乎不可用的配置。要在单个文件夹中收集所有配置,可以执行以下操作:

task collectJars(type: Copy){
    into "$buildDir/output/lib"
    configurations.all{ config ->
        from config
    }
}

“在Gradle Android项目中,是否可以将所有依赖项收集到一个地方作为jar文件?”--不,因为并非所有依赖项都是jar文件。它们可能是AAR文件或其他工件。是否可以在一个位置收集所有工件?“是否可以在Gradle Android项目中将所有依赖项作为jar文件收集到一个位置?”--不,因为并非所有依赖项都是jar文件。它们可能是AAR文件或其他工件。是否可以在一个位置收集所有工件?“是否可以在Gradle Android项目中将所有依赖项作为jar文件收集到一个位置?”--不,因为并非所有依赖项都是jar文件。它们可能是AAR文件或其他工件。是否可以在一个位置收集所有工件?“是否可以在Gradle Android项目中将所有依赖项作为jar文件收集到一个位置?”--不,因为并非所有依赖项都是jar文件。它们可能是AAR文件或其他工件。是否可以在一个位置收集所有工件?