有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java错误:安卓 studio中不允许使用字符串类型(在带有值的“主题”处)

当我运行安卓 studio时,我总是会遇到以下错误:

:app:prepareComAndroidSupportAnimatedVectorDrawable2321Library UP-TO-DATE :app:preReleaseBuild UP-TO-DATE :app:checkDebugManifest :app:preDebugBuild UP-TO-DATE :app:preBuild UP-TO-DATE Information:BUILD FAILED :app:prepareComAndroidSupportDesign2321Library UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72321Library :app:prepareComAndroidSupportSupportV42321Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72321Library UP-TO-DATE :app:prepareComAndroidSupportSupportVectorDrawable2321Library 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 UP-TO-DATE :app:processDebugManifest UP-TO-DATE :app:processDebugResources

C : \Users\User\Desktop\UniTools\app\build\intermediates\exploded- aar\com.安卓.support\appcompat-v7\23.2.1\res\values\values.xml

Error:(315, 5) String types not allowed (at 'theme' with value ''). Error:Execution failed for task ':app:processDebugResources'. com.安卓.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\User\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1

 <style name="Base.TextAppearance.AppCompat.SearchResult" parent="">
    <item name="安卓:textStyle">normal</item>
    <item name="安卓:textColor">?安卓:textColorPrimary</item>
    <item name="安卓:textColorHint">?安卓:textColorHint</item>
</style>

然后Android Studio将这段代码放入值中。xml。你知道问题出在哪里吗


共 (1) 个答案

  1. # 1 楼答案

    编辑你的价值观。从资源管理器中选择“xml”:查找值。xml->;在记事本中编辑->;重建项目

    您正试图编辑生成的文件,以使parent=”“反复出现。因为您无法编辑生成的文件