当前位置: 首页 > 知识库问答 >
问题:

无法生成项目(Android studio)ProjectConfigurationException

鲁龙野
2023-03-14
apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion "27.0.3"
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        multiDexEnabled true  // this line will solve this problem
        applicationId "com.example.jone1.navigation_drawer"
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 1
        multiDexEnabled true
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }
    buildTypes {
        release {
            multiDexKeepFile file('multidex-config.txt')
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:multidex:1.0.3'
    compile 'com.google.zxing:core:3.3.3'
    compile 'com.journeyapps:zxing-android-embedded:3.4.0'
    compile 'com.google.firebase:firebase-core:16.0.9'
    compile 'com.google.firebase:firebase-messaging:18.0.0'
    compile 'org.bouncycastle:bcprov-jdk15on:1.56'
    compile 'org.bouncycastle:bcpkix-jdk15on:1.56'
    compile 'com.squareup.okhttp3:okhttp:3.11.0'
    compile 'com.squareup.retrofit2:retrofit:2.4.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:appcompat-v7:27.+'
    compile 'com.android.support:design:27.+'
    compile 'com.android.support.constraint:constraint-layout:1.1.3'
    compile 'com.google.android.gms:play-services:12.0.1'
    androidTestCompile 'junit:junit:4.12'
    testCompile 'junit:junit:4.12'
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.

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

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

allprojects {
    repositories {
        jcenter()
        google()
    }
}

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

org.gradle.api.ProjectConfigurationException:配置项目“:App”时出现问题。在

共有1个答案

单于钊
2023-03-14

原因:org.gradle.internal.resolve.ArtifactNotFoundException:找不到support-compat.jar(com.android.support:support-compat:27.1.1)。在以下位置进行了搜索:https://jcenter.bintray.com/com/android/support/support-compat/27.1.1/support-compat-27.1.1.jar

尝试从以下位置更新:

classpath "com.android.tools.build:gradle:2.3.2"

致:

classpath "com.android.tools.build:gradle:3.4.0"
 类似资料:
  • [错误]生成无法读取1个项目->[帮助1][错误] [错误]项目com.example.angularjs:demo:0.0.1-快照(C:\users\vvk\download\demo\POM.xml)有1个错误[错误] com.example.angularjs:demo:0.0.1-快照:无法解析的父POM:无法传输项目org.springframework.boot:spring-boo

  • 我创建了一个maven项目,其中包含测试用例及其相应的功能。验证检查的所有功能都放在src/main/java下。测试用例也是src/test/java的一部分。我已经把log4j放在下面了。src/main/resources中的属性。 此外,在每个类文件中,我添加了以下行以及以下导入: 日志的初始化: 并且使用创建日志。 还有,在pom中。xml,添加了以下依赖项: 但是我看到日志没有在控制台

  • 我得到以下指定错误, 错误:(115)***Android NDK:正在中止。停下来。错误:执行任务“:un7zip:CompileReleAsendk”失败。 com.android.ide.common.process.processException:使用参数{ndk_project_path=null app_build_script=e:\apprizort\rizortCardboar

  • 我们在4人的小团队中工作。我们使用docker来部署我们的服务。其中一个服务是java Spring Boot项目,它是在使用maven构建docker映像后部署的。要制作Spring Boot服务的docker映像,我们使用。 有趣的是,我的同事在建立SpringBoot服务的docker形象方面没有问题。我得到了maven的错误信息: 我试图从,重新启动docker并删除所有图像。 后来我尝试

  • 我运行的是Mac OSX,我安装了android Studio-它启动正常。 问题1 我用一个空活动开始一个新项目。在最上面的窗户上我收到一条信息 问题2 我在底部窗口中看到以下错误: 错误:CompilesDKVersion android-L需要使用JDK 7 Open SDK Settings进行编译 打开文件 当我尝试在设备上运行项目时,我得到以下错误: 失败[INSTALL_FAILED