简体   繁体   English

Android studio 3.3.1 gradle 4.10.1 make project BUILD FAILED

[英]Android studio 3.3.1 gradle 4.10.1 make project BUILD FAILED

I created a new project and made "Make Project" and failed.我创建了一个新项目并制作了“制作项目”并失败了。

Executing tasks: [:app:assembleDebug]

Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild
Task :app:compileDebugAidl NO-SOURCE
Task :app:compileDebugRenderscript
Task :app:checkDebugManifest
Task :app:generateDebugBuildConfig
Task :app:prepareLintJar
Task :app:generateDebugSources
Task :app:javaPreCompileDebug
Task :app:mainApkListPersistenceDebug
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:mergeDebugResources
Task :app:createDebugCompatibleScreenManifests
Task :app:processDebugManifest
Task :app:processDebugResources
Task :app:compileDebugJavaWithJavac
Task :app:compileDebugNdk NO-SOURCE
Task :app:compileDebugSources
Task :app:mergeDebugShaders
Task :app:compileDebugShaders
Task :app:generateDebugAssets
Task :app:mergeDebugAssets
Task :app:mergeExtDexDebug
Task :app:mergeLibDexDebug
Task :app:transformClassesWithDexBuilderForDebug
Task :app:mergeProjectDexDebug
Task :app:validateSigningDebug
Task :app:signingConfigWriterDebug
Task :app:mergeDebugJniLibFolders
Task :app:transformNativeLibsWithMergeJniLibsForDebug FAILED

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ‘:app:transformNativeLibsWithMergeJniLibsForDebug’.
Internal error when trying to read zip file ‘C:\Users\james52.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\67ba81e89842cc3e1a0ff84b0e9b8d8f\jars\classes.jar’.

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.orghttps://help.gradle.org获取更多帮助

BUILD FAILED in 14s 24 actionable tasks: 24 executed'在 14 秒内构建失败 24 个可操作的任务:24 个已执行'

grandle格兰德尔

buildscript {
repositories {
google()
jcenter()

}
dependencies {
    classpath 'com.android.tools.build:gradle:3.3.1'

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

allprojects {
repositories {
google()
jcenter()

}
}

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

apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId “com.example.myapplication”
minSdkVersion 28
targetSdkVersion 28
versionCode 1
versionName “1.0”
testInstrumentationRunner “android.support.test.runner.AndroidJUnitRunner”
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt’), ‘proguard-rules.pro’
}
}
}

dependencies {
implementation fileTree(dir: ‘libs’, include: [’*.jar’])
implementation ‘com.android.support:appcompat-v7:28.0.0’
implementation ‘com.android.support.constraint:constraint-layout:1.1.3’
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 studio 版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM