我只是分散了错误,但主要错误仍然存在:(仍然没有解决方案
C: \MagicSoloons\app\src\main\res\libs\YouTubeAndroidPlayerApi.jar:1:2:错误:文档中根元素前面的标记必须格式正确。:app:mergeDugResources失败
失败:生成失败,出现异常。
-
出了什么问题:任务":app:mergeDugResources"的执行失败。
C:\MagicSoloons\app\src\main\res\libs\YouTubeAndroidPlayerApi.jar:1:2:错误:文档中根元素之前的标记必须格式正确。
-
尝试:使用--info或--debug选项运行以获得更多日志输出。
-
例外情况是:org.gradle.api.tasks.TaskExecutionException:任务":app:mergeDugResources"的执行失败。位于org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84)位于org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)位于org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUptoDateTaskExecutor.java:62)网址:org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)位于org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmpitySourceFilesTaskexecuter.java:88)位于org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)位于org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)位于org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnyIfTaskexecuter.java:54)位于org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)位于org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExcessionTaskExecuter.java:34)位于org.gradle.expension.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236)位于org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.exexecute(DefaultTaskGraphExecuter.java:228)网址:org.gradle.internal.Transformers$4.transform(变形金刚.java:169)网址:org.gradle.internal.prounce.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)网址:org.gradle.internal.prounce.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)位于org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)位于org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)网址:org.gradle.expension.taskgraph.AbstractTaskPlanExecutior$TaskExecutiorWorker.processTask(AbstractTaskPlanExecutor.java:77)网址:org.gradle.expension.taskgraph.AbstractTaskPlanExecutiator$TaskExecutiorWorker.run(AbstractTaskPlanExecutor.java:58)网址:org.gradle.expension.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutiator.java:32)位于org.gradle.expension.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:113)网址:org.gradle.expension.SelectedTaskExecutionAction.expenate(SelectedTaskExecutionAction.java:37)在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecutor.java:37)在org.gradle.exexecution.DefaultBuildExecuter.access$000(DefaultBuildExecutor.java:23)在org.gradle.expension.DefaultBuildExecuter$1.prough(DefaultBuildExecuter.java:43)网址:org.gradle.exexecution.DryRunBuildExecutionAction.exexecute(DryRunBuildingExecutionAction.java:32)在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecutor.java:37)在org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecutor.java:30)在org.gradle.sinitialization.DefaultGradleLauncher$3.exexecute(DefaultGradleLauncher.java:196)位于org.gradle.sinitialization.DefaultGradleLauncher$3.execure(DefaultGradleLauncher.java:193)网址:org.gradle.internal.Transformers$4.transform(变形金刚.java:169)网址:org.gradle.internal.prounce.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)位于org.gradle.internal.prounce.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutior.java:56)位于org.gradle.sitialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:193)位于org.gradle.sitialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)位于org.gradle.sitialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)位于org.gradle.selauncher.exec.GradleBuildController.run(GradleBuildControll.java:71)网址:org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:50)网址:org.gradle.selauncher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)网址:org.gradle.tooling.internal.provider.runner.RunAsBuildOperationBuildActionRunner$1.execute(RunAsBuildOperationBuildingActionRunner.java:43)网址:org.gradle.tooling.internal.provider.runner.RunAsBuildOperationBuildActionRunner$1.execute(RunAsBuildOperationBuildingActionRunner.java:40)网址:org.gradle.internal.Transformers$4.transform(变形金刚.java:169)网址:org.gradle.internal.prounce.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)位于org.gradle.internal.prounce.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutior.java:56)网址:org.gradle.tooling.internal.provider.runner.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildingActionRunner.java:40)网址:org.gradle.tooling.internal.provider.runner.SubscribebleBuildActionRunner.run(SubscribebleBuildactionRunner.java:75)网址:org.gradle.selauncher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)位于org.gradle.selauncher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecutor.java:41)位于org.gradle.selauncher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecutor.java:26)网址:org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)位于org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)位于org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:44)位于org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:29)位于org.gradle.selauncher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)位于org.gradle.selauncher.daemon.server.exec.BuildCommandOnly.exexecute(BuildCommandOnly.java:36)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecactionLogger.java:26)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfsSingleUsed daemon.java:34)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)位于org.gradle.selauncher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)网址:org.gradle.util.Swaper.swap(Swapper.java:38)位于org.gradle.selauncher.daemon.server.exec.ForwardClientInput.execure(ForwardClientInput.java:72)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)位于org.gradle.selauncher.daemon.server.exec.BuildCommandOnly.exexecute(BuildCommandOnly.java:36)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildingEnvironment.java:72)位于org.gradle.selauncher.daemon.server.exec.BuildCommandOnly.exexecute(BuildCommandOnly.java:36)网址:org.gradle.selauncher.daemon.server.api.DemonCommandExecution.proceed(DaemonCommentExecution.java:120)位于org.gradle.selauncher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespandWithBusy.java:50)位于org.gradle.selauncher.daemon.server.DemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)网址:org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)位于org.gradle.internal.concurrent.StoppableExecutiorImpl$1.run(StoppableExecutiorimpl.java:40)引起原因:com.android.build.gradle.tasks.ResourceException:C:\MagicSolons\app\src\main\res\libs\YouTubeAndroidPlayerApi.jar:1:2:错误:文档中根元素前面的标记必须格式正确。网址:com.android.build.gradle.tasks.MergeResources.doFullTaskAction(MergeResources.cava:166)网址:com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:88)网址:org.gradle.internal.reflect.JavaMethod.reinvoke(JavaMethod.java:73)位于org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:163)位于org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execure(DefaultTaskClassInfoStore.java:134)位于org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execure(DefaultTaskClassInfoStore.java:123)位于org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:95)位于org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:76)…还有78引起原因:C:\MagicSolons\app\src\main\res\libs\YouTubeAndroidPlayerApi.jar:1:2:错误:文档中根元素之前的标记必须格式正确。网址:com.android.ide.common.res2.MergingException.sthrowIfNonEmpty(MergingException.java:152)网址:com.android.ide.common.res2.DataSet.loadFromFiles(DataSet.java:257)网址:com.android.ide.common.res2.ResourceSet.loadFromFiles(ResourceSet.java:53)网址:com.android.build.gradle.tasks.MergeResources.doFullTaskAction(MergeResources.cava:136)…还有85个
BUILD FAILED
总时间:2.443秒
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.danutneagu.magicsaloons">
<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.READ_PROFILE"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name=".LoginActivity"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:theme="@style/Theme.AppCompat"/>
<activity
android:name=".SignupActivity"
android:theme="@style/Theme.AppCompat"/>
<activity
android:name=".CoaforServicesList"
android:theme="@style/Theme.AppCompat">
</activity>
<activity android:name=".ImageList">
</activity>
<activity
android:name=".Contact"
android:theme="@style/Theme.AppCompat">
</activity>
<activity android:name=".ImageList2">
</activity>
<activity
android:name=".CoaforServicesList2"
android:theme="@style/Theme.AppCompat">
</activity>
<activity
android:name=".AboutUs"
android:theme="@style/Theme.AppCompat">
</activity>
<activity
android:name=".VideoViewActivity">
</activity>
<activity
android:name=".Deals"
android:theme="@style/Theme.AppCompat">
</activity>
<activity
android:name=".Gallery"
android:theme="@style/Theme.AppCompat">
</activity>
<activity
android:name=".Blog"
android:theme="@style/Theme.AppCompat">
</activity>
<activity
android:name=".WorkWithUs"
android:theme="@style/Theme.AppCompat">
</activity>
<activity
android:name=".Newsletter"
android:theme="@style/Theme.AppCompat">
</activity>
<activity android:name=".CoaforServicesAndProductsSearch">
</activity>
<activity android:name=".YoutubeActivity">
</activity>
</application>
大家好,每次我想清理/重建/构建/编译时,我都会遇到这个问题,我真的被卡住了,因为我是一个新的开发人员。主要问题是使YoutubeAPI工作。
我很幸运,只有1次没有错误,但在我尝试编译后,它返回了同样的错误。
这真的很烦人。欢迎任何想法。
谢谢!
根据此引用,确保"
位于文件的顶部。正如本文档中所述,如果元素嵌套不正确,则此标记将是错误的。在格式良好的xml文档中,xml元素的嵌套必须正确。如果验证xml解析器没有正确遵循DTD设置的规则,它将生成一个错误。