【问题标题】:Android project: gradle configure failsAndroid项目:gradle配置失败
【发布时间】:2019-12-21 21:01:42
【问题描述】:

我正在尝试创建一个新项目,但构建失败并且我无法解决它,谁能告诉我下图中出了什么问题

apply plugin: 'com.android.application' android {
compileSdkVersion 28
defaultConfig {
    applicationId "com.example.hossein.myshgop"
    minSdkVersion 15
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
} dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'}

【问题讨论】:

  • 请分享您的 build.gradle 文件的内容
  • 什么是构建错误?

标签: android gradle build build.gradle configure


【解决方案1】:

您的 PC 中的互联网连接似乎存在问题。请检查互联网连接。 Gradle 需要正确的互联网连接。

【讨论】:

  • 我检查了互联网连接,它工作正常,但仍然构建失败
  • 也请分享你的项目级 build.gradle
  • 对不起,我的朋友,我是初学者,不知道项目级别 build.gradle 的意思。你能告诉我该怎么做吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-07-03
  • 1970-01-01
  • 2014-04-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多