我是一个非常初学者..事实上我前几天安装了Android Studio。 无论如何,当我点击运行'app'时它会说:
Executing tasks: [:app:assembleDebug]
Configuration on demand is an incubating feature. :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72220Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42220Library UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :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] :6:7: Il tipo di elemento "resources" deve terminare con la corrispondente tag finale "< /resources>".
C:\Users\x\AndroidStudioProjects\MyApplication\app\src\main\res\values\styles.xml:5:6: Error: Il tipo di elemento "resources" deve terminare con la corrispondente tag finale "< /resources>". :app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong: Execution failed for task ':app:mergeDebugResources'.
> C:\Users\x\AndroidStudioProjects\MyApplication\app\src\main\res\values\styles.xml:5:6: Error: Il tipo di elemento "resources" deve terminare con la corrispondente tag finale "< /resources>".
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 7.517 secs
如果我进入styles.xml,我有:
< resources>
<!-- Base application theme. -->
<style name="Theme.AppCompat.Light.DarkActionBar" parent="Base.Theme.AppCompat.Light.DarkActionBar" />
<!-- Customize your theme here. -->
</style>
< /resources>
所以我不知道..问题是什么?帮我! :(
答案 0 :(得分:1)
你的风格正在关闭
<style name="Theme.AppCompat.Light.DarkActionBar"
parent="Base.Theme.AppCompat.Light.DarkActionBar" />
由/>
所以额外的</style>
正在寻找一个不存在的开放式标记。您可以将其删除或将/>
更改为>
正如旁注,最好是用英文发布日志文件。