我创建了一个新项目并创建了“ Make Project”,但失败了。
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.
获得更多帮助
14秒内失败 24个可执行任务:24个已执行'
爷爷
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’
}
答案 0 :(得分:1)
将PROJECT LEVEL TO VERSION的build:gradle版本更改为android studio版本