android - prolog中不允许的内容

时间:2014-11-17 10:37:58

标签: android android-studio protocol-buffers

在搜索解决方案失败2小时后,我决定在这里提问。

我已经从8月份工作的git存储库下载了一个项目。 Android Studio让我在build.gradle文件中更新了classpath和buildToolsVersion。执行此操作后,我收到app错误:mergeDebugResources失败。



:app:preBuild
:app:preDebugBuild
:app:checkDebugManifest
:ScavengerHunt-endpoints:compileLint
:ScavengerHunt-endpoints:copyReleaseLint UP-TO-DATE
:ScavengerHunt-endpoints:preBuild
:ScavengerHunt-endpoints:preReleaseBuild
:ScavengerHunt-endpoints:checkReleaseManifest
:ScavengerHunt-endpoints:preDebugBuild
:ScavengerHunt-endpoints:preDebugTestBuild
:ScavengerHunt-endpoints:prepareComAndroidSupportSupportV42000Library
:ScavengerHunt-endpoints:prepareComGoogleAndroidGmsPlayServices6171Library
:ScavengerHunt-endpoints:prepareReleaseDependencies
:ScavengerHunt-endpoints:compileReleaseAidl
:ScavengerHunt-endpoints:compileReleaseRenderscript UP-TO-DATE
:ScavengerHunt-endpoints:generateReleaseBuildConfig UP-TO-DATE
:ScavengerHunt-endpoints:generateReleaseAssets UP-TO-DATE
:ScavengerHunt-endpoints:mergeReleaseAssets UP-TO-DATE
:ScavengerHunt-endpoints:generateReleaseResValues UP-TO-DATE
:ScavengerHunt-endpoints:generateReleaseResources UP-TO-DATE
:ScavengerHunt-endpoints:mergeReleaseResources
:ScavengerHunt-endpoints:processReleaseManifest UP-TO-DATE
:ScavengerHunt-endpoints:processReleaseResources
:ScavengerHunt-endpoints:generateReleaseSources
:ScavengerHunt-endpoints:compileReleaseJava
:ScavengerHunt-endpoints:extractReleaseAnnotations
:ScavengerHunt-endpoints:mergeReleaseProguardFiles UP-TO-DATE
:ScavengerHunt-endpoints:processReleaseJavaRes UP-TO-DATE
:ScavengerHunt-endpoints:packageReleaseJar UP-TO-DATE
:ScavengerHunt-endpoints:compileReleaseNdk UP-TO-DATE
:ScavengerHunt-endpoints:packageReleaseJniLibs UP-TO-DATE
:ScavengerHunt-endpoints:packageReleaseLocalJar UP-TO-DATE
:ScavengerHunt-endpoints:packageReleaseRenderscript UP-TO-DATE
:ScavengerHunt-endpoints:packageReleaseResources UP-TO-DATE
:ScavengerHunt-endpoints:bundleRelease UP-TO-DATE
:app:preReleaseBuild
:app:prepareComAndroidSupportSupportV42100Library
:app:prepareComGoogleAndroidGmsPlayServices6171Library
:app:prepareScavenegetHuntScavengerHuntEndpointsUnspecifiedLibrary
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
[Fatal Error] :1:1: Content is not allowed in prolog.

D:\scaveneget-hunt\app\src\main\res\protobuf\protocol.proto:0:0: Error: Content is not allowed in prolog.
:app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> D:\scaveneget-hunt\app\src\main\res\protobuf\protocol.proto:0:0: Error: Content is not allowed in prolog.




我试图删除.idea也用hexeditor打开了这个文件,但0:0没有任何内容。如果我应该提供更多信息,请告诉我。

- UPDATE -

如果我从.proto文件中删除了所有内容,则因为"文件过早结束而失败#34;这似乎没问题。如果我在下面编写代码,则错误消息是"不允许内容"试。



message Im{
    required string text = 1;
}




我在Android Studio的设置中遗漏了什么吗?

0 个答案:

没有答案