gpt4 book ai didi

安卓同步失败

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

我是android开发的新手。我正在尝试打开一个现有项目并对其进行编译。这是我第一次使用 android studio 和 Gradle 文件让我有点困惑。
我正在尝试同步它,但它失败了。这是 Gradle.build 的内容

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"

defaultConfig {
applicationId "de.establishement.packagelist"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"

testInstrumentationTrial "android.support.test.trial.AndroidJUnitRunner"

}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable= true
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
testCompile 'junit:junit:4.12'
}

我下载了这个项目,并将它放在我的桌面上。这是我在构建消息中得到的:
    FAILURE: Build failed with an exception.

* Where:
Build file '/mac/Desktop/javaproject/build.gradle' line: 21

* What went wrong:
Could not compile build file '/Users/mac/Desktop/javaproject/build.gradle'.
> startup failed:
build file '/Users/mac/Desktop/javaproject/build.gradle': 21: Statement labels may not be used in build scripts.
In case you tried to configure a property named 'debuggable', replace ':' with '=' or ' ', otherwise it will not have the desired effect.
@ line 21, column 25.
debuggable: true
^

1 error


* 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 10s
ERROR: startup failed:
build file '/Users/mac/Desktop/javaproject/build.gradle': 21: Statement labels may not be used in build scripts.
In case you tried to configure a property named 'debuggable', replace ':' with '=' or ' ', otherwise it will not have the desired effect.
@ line 21, column 25.
debuggable: true
^

1 error

Open File

最佳答案

查看您的日志,您必须更改 debuggable: truedebuggable = true
你试过了吗?

关于安卓同步失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59976684/

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