[英]Error : String types not allowed (at 'theme' with value ") in android studio
When I run android studio, I keep getting this error: 当我运行android 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
:app:prepareComAndroidSupportAnimatedVectorDrawable2321Library UP-TO-DATE:app:preReleaseBuild UP-TO-DATE:app:checkDebugManifest:app:preDebugBuild UP-TO-DATE:app:preBuild UP-TO-DATE信息:BUILD FAILED:app:prepareComAndroidSupport UP-2321Library TO-DATE:app:prepareComAndroidSupportAppcompatV72321Library:app:prepareComAndroidSupportSupportV42321Library UP-TO-DATE:app:prepareComAndroidSupportRecyclerviewV72321Library UP-TO-DATE:app:prepareComAndroidSupportSupportVectorDrawable2321Library UP-TO-DATE:app-e:Appl:UP-TO-DATE 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:generateDebugResValues UP-TO-DATE DATE:app:mergeDebugResources UP-TO-DATE:app:processDebugManifest UP-TO-DATE:app:processDebugResources
C : \\Users\\User\\Desktop\\UniTools\\app\\build\\intermediates\\exploded- aar\\com.android.support\\appcompat-v7\\23.2.1\\res\\values\\values.xml
C:\\ Users \\ User \\ Desktop \\ UniTools \\ app \\ build \\ intermediates \\ explaed- aar \\ com.android.support \\ appcompat-v7 \\ 23.2.1 \\ res \\ values \\ values.xml
Error:(315, 5) String types not allowed (at 'theme' with value '').
错误:(315,5)不允许使用字符串类型(在“主题”下的值为“”)。 Error:Execution failed for task ':app:processDebugResources'.
错误:任务':app:processDebugResources'的执行失败。 com.android.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
com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:处理'command'C:\\ Users \\ User \\ AppData \\ Local \\ Android \\ sdk \\ build-tools \\ 23.0.2 \\ aapt .exe''以非零退出值1结束
<style name="Base.TextAppearance.AppCompat.SearchResult" parent="">
<item name="android:textStyle">normal</item>
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:textColorHint">?android:textColorHint</item>
</style>
Then Android Studio takes me this this code in the values.xml. 然后,Android Studio在values.xml中将此代码带给我。 Any ideas on what the problem is?
关于什么是问题的任何想法?
edit your 'values.xml' from the explorer: find values.xml->edit in notepad-> rebuild project. 在资源管理器中编辑“ values.xml”:在记事本中找到values.xml-> edit->重建项目。
you are trying to edit the generated file so parent="" appears again and again. 您正在尝试编辑生成的文件,因此parent =“”一次又一次出现。 because you cannot edit generated file
因为您无法编辑生成的文件
You assign empty value to 'theme' 您为“主题”分配空值
I think 'theme' in styles.xml or you can search for 'theme' in xml files under 'values' folder. 我认为styles.xml中的“主题”,或者您可以在“值”文件夹下的xml文件中搜索“主题”。
then check what value you assigned for 'theme' 然后检查您为“主题”分配了什么值
I had similar problems. 我有类似的问题。 To solve it just edit the
values.xml
file in notepad and save it, then you should be good-to-go. 要解决此问题,只需在记事本中编辑
values.xml
文件并将其保存,那么您就可以做好了。 Go to build/intermediates/ress/merged/debug/values
. 转到
build/intermediates/ress/merged/debug/values
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.