gpt4 book ai didi

java - 无法解析配置 ':app:_debugApk' 的所有依赖项。找不到名称为 'default' 的配置

转载 作者:太空宇宙 更新时间:2023-11-03 12:47:02 25 4
gpt4 key购买 nike

我已经添加了 gradle 文件。请查看它们并帮助我解决问题。当我从 github 复制这个项目时,我在 gradle sync 中遇到了问题我跟着每一步。谢谢

    // Top-level build file where you can add configuration options common      to all sub-projects/modules.enter code here

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

task copy_cardboard_images() {
doFirst {
exec {
if (System.properties['os.name'].toLowerCase().contains('windows')) {
// windows
commandLine 'cmd', '/c', 'adb', 'pull', '/mnt/shell/emulated/0/DCIM/CardboardCamera'
} else {
// linux
commandLine 'adb', 'pull', '/mnt/shell/emulated/0/DCIM/CardboardCamera'
}
}
}
doLast {
copy {
from 'CardboardCamera'
into 'website/images'
}
}
}

task remove_cardboard_images() {
doFirst {
exec {
if (System.properties['os.name'].toLowerCase().contains('windows')) {
// windows
commandLine 'cmd', '/c', 'adb', 'shell', 'rm', '-r', '/mnt/shell/emulated/0/DCIM/CardboardCamera'
} else {
// linux
commandLine 'adb', 'shell', 'rm', '-r', '/mnt/shell/emulated/0/DCIM/CardboardCamera'
}
}
}
}

task move_cardboard_images() {
dependsOn copy_cardboard_images
dependsOn remove_cardboard_images
}



Build.gradle : app module


apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.google.devrel.vrviewapp"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile project(':gvr-android-sdk/libraries:common')
compile project(':gvr-android-sdk/libraries:commonwidget')
compile project(':gvr-android-sdk/libraries:panowidget')
compile project(':gvr-android-sdk/libraries:videowidget')
}


Settings.gradle :

This code belongs to settings.gradle file

include ':app'
include ':app'
include ':gvr-android-sdk/libraries:audio'
include ':gvr-android-sdk/libraries:base'
include ':gvr-android-sdk/libraries:common'
include ':gvr-android-sdk/libraries:commonwidget'
include ':gvr-android-sdk/libraries:panowidget'
include ':gvr-android-sdk/libraries:videowidget'

最佳答案

您是否检查了位于 Android 文件夹中的 Android 项目的所有依赖项?里面有 settings.gradle 文件。在此文件中,将检查项目的每个依赖项。

示例:

include 'your dependencies'

project(':your dependencies').projectDir = new File('path dependencies')

关于java - 无法解析配置 ':app:_debugApk' 的所有依赖项。找不到名称为 'default' 的配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41546761/

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