Я получаю это сообщение об ошибке: Сборка: сборка не удалась -> Выполнить сборку -> Выполнить задачи ->: app: processDebugResources -> executeTaskAction. Порядок кода, представленного ниже, выглядит следующим образом: сообщение об ошибке, затем build.gradle (проект), а затем build.gradle (приложение).
На это сообщение об ошибке уже много раз отвечали другие пользователи StackOverflow, но ни одно из предложенных им решений не помогло мне. В основном потому, что используемые ими версии предполагают, что я исправляю настройку «com.android.support:appcompat-v7:28.0.0» в build.gradle (Project: app), но у них разные версии, так как эти посты от 2+ много лет назад. Я попытался очистить проект, очистить сборку, перестроить сборку и проект, добавить репозиторий "Maven", переустановить все Sdks ... за последние три часа ничего не получалось.
Это сообщение об ошибке:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugResources'. at
org.gradle.api.internal.tasks.execution.ExecuteActionsTask
Executer.executeActions(ExecuteActionsTaskExecuter.java:103) at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.
execute(ExecuteActionsTaskExecuter.java:73) at
org.gradle.api.internal.tasks.execution.OutputDirectoryCreating
TaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51) at
org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.
execute(SkipUpToDateTaskExecuter.java:59) at
org.gradle.api.internal.tasks.execution.ResolveTaskOutputCaching
StateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at
org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.
execute(ValidatingTaskExecuter.java:59)
at
org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTask
Executer.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at
org.gradle.api.internal.tasks.execution.FinalizeInputFileProperties
TaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.
java:44)
at
org.gradle.api.internal.tasks.execution.CleanupStaleOutputs
Executer.execute(CleanupStaleOutputsExecuter.java:91)
at
org.gradle.api.internal.tasks.execution.ResolveTaskArtifactState
TaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
at
org.gradle.api.internal.tasks.execution.SkipTaskWithNoActions
Executer.execute(SkipTaskWithNoActionsExecuter.java:59)
at
org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter
.execute(SkipOnlyIfTaskExecuter.java:54)
at
org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTask
Executer.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at
org.gradle.api.internal.tasks.execution.CatchExceptionTask
Executer.execute(CatchExceptionTaskExecuter.java:34)
at
org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$Event
FiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor$
RunnableBuildOperationWorker.execute(DefaultBuildOperation
Executor.java:336)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor$Runnable
BuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor.
execute(DefaultBuildOperationExecutor.java:199)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor.
run(DefaultBuildOperationExecutor.java:110)
at
org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$Event
FiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249)
at
org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$Event
FiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)
at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$Task
ExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$Task
ExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$Task
ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$Task
ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at
org.gradle.execution.taskgraph.DefaultTaskExecutionPlan
.execute(DefaultTaskExecutionPlan.java:663)
at
org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.
executeWithTask(DefaultTaskExecutionPlan.java:597)
at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$Task
ExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at
org.gradle.internal.concurrent.ExecutorPolicy$CatchAnd
RecordFailures.onExecute(ExecutorPolicy.java:63)
at
org.gradle.internal.concurrent.ManagedExecutorImpl$1.run
(ManagedExecutorImpl.java:46)
at
java.util.concurrent.ThreadPoolExecutor.runWorker
(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.
run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$Managed
ThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.android.builder.internal.aapt.v2.Aapt2Exception:
Android resource linking failed
Output:
/Users/myname/Downloads/AndroidProjects/MediaLib/Synthesizer1
/app/build/generated/not_namespaced_r_class_sources/
debug/processDebugResources/r/com/example/myname
/synthesizer1/R.java: error: invalid symbol name
'com.example.firstname_lastname.synthesizer:id/null'.
Command: /Users/myname/.gradle/caches/transforms-1/files-1.1/aapt2-
3.2.1-4818971-osx.jar/d5f72cb60485350dcf6302aeab61e4d4/aapt2-3.2.1-
4818971-osx/aapt2 link -I\
/Users/myname/Library/Android/sdk/platforms/android-
28/android.jar\
--manifest\
/Users/myname/Downloads/AndroidProjects/MediaLib/Synthesizer1
/app/build/intermediates/merged_manifests/debug/
processDebugManifest/merged/AndroidManifest.xml\
-o\
/Users/myname/Downloads/AndroidProjects/MediaLib/Synthesizer1/app
/build/intermediates/processed_res/debug/processDebugResources
/out/resources-debug.ap_\
-R\
@/Users/myname/Downloads/AndroidProjects/MediaLib/Synthesizer1/
app/build/intermediates/incremental/processDebugResources/resources-
list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
/Users/myname/Downloads/AndroidProjects/MediaLib/Synthesizer1/app
/build/generated/not_namespaced_r_class_sources/debug/processDebug
Resources/r\
--custom-package\
com.example.myname.synthesizer1\
-0\
apk\
--output-text-symbols\
/Users/myname/Downloads/AndroidProjects/MediaLib/Synthesizer1/app/
build/intermediates/symbols/debug/R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0
at
com.android.builder.internal.aapt.v2.Aapt2DaemonImpl.doLink(Aapt2
DaemonImpl.kt:177)
at
com.android.builder.internal.aapt.v2.Aapt2Daemon.link(Aapt2Daemon.
kt:103)
at
com.android.builder.internal.aapt.v2.Aapt2DaemonManager$Leased
AaptDaemon.link(Aapt2DaemonManager.kt:176)
at
com.android.builder.core.AndroidBuilder.processResources(Android
Builder.java:823)
at
com.android.build.gradle.internal.res.LinkApplicationAndroid
ResourcesTask.invokeAaptForSplit(LinkApplicationAndroidResources
Task.java:525)
at
com.android.build.gradle.internal.res.LinkApplicationAndroid
ResourcesTask.doFullTaskAction(LinkApplicationAndroidResourcesTask
.java:275)
at
com.android.build.gradle.internal.tasks.IncrementalTask.task
Action(IncrementalTask.java:106)
at sun.reflect.GeneratedMethodAccessor210.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod
AccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at
org.gradle.api.internal.project.taskfactory.IncrementalTaskAction
.doExecute(IncrementalTaskAction.java:50)
at
org.gradle.api.internal.project.taskfactory.StandardTaskAction.
execute(StandardTaskAction.java:39)
at
org.gradle.api.internal.project.taskfactory.StandardTaskAction
.execute(StandardTaskAction.java:26)
at
org.gradle.api.internal.tasks.execution.ExecuteActionsTask
Executer$1.run(ExecuteActionsTaskExecuter.java:124)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor$Runnable
BuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor$Runnable
BuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor.
execute(DefaultBuildOperationExecutor.java:199)
at
org.gradle.internal.progress.DefaultBuildOperationExecutor.run
(DefaultBuildOperationExecutor.java:110)
at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter
.executeAction(ExecuteActionsTaskExecuter.java:113)
at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter
.executeActions(ExecuteActionsTaskExecuter.java:95)
... 33 more
Вот что сейчас находится в моем build.gradle (Project):
// Файл сборки верхнего уровня, в который можно добавить параметры конфигурации, общие для всех подпроектов / модулей.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
maven {
url "https://maven.google.com"
}
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
А вот что находится в моем build.gradle (Модуль: приложение);
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.artchen_wei.synthesizer"
minSdkVersion 22
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'
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'
}
Я пытаюсь заставить все шаги сборки работать эффективно, чтобы я мог выполнить это задание.