Android Studio 调色板被禁用

标签 android android-studio palette

我不知道从什么时候开始,但我的调色板没有出现,我做了一些搜索,他们说:“重新启动项目”,但我不知道为什么当我进入 View >>工具窗口,调色板被禁用:

Show menu where palette is disabled

我也做了一个更新,看看它是否出现但没有。 Logcat 说:

0 warnings.
0 errors.

控制台:

Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
AGPBI: {"kind":"ERROR","text":"Resource id cannot be an empty string (at \u0027id\u0027 with value \u0027@+id/\u0027).","sourcePath":"C:\\Users\\...\\AndroidStudioProjects\\Solutis\\app\\src\\main\\res\\layout\\activity_contact.xml","position":{"startLine":7,"startColumn":17,"startOffset":308,"endColumn":22,"endOffset":313},"original":""}


 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\...\AppData\Local\Android\Sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

最佳答案

我发现了很多关于这个问题的帖子,我找到了原因,调色板没有被禁用,它被激活但是它隐藏在这里:

enter image description here

所以你只需要拉伸(stretch)它

关于Android Studio 调色板被禁用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30590398/

相关文章:

java - Canvas.drawText 中的双重转义百分号 (%)

Android Room - 在查询中使用外键

android - 为什么 bundle 中的 getExtra() 为 null 而 bundle mMap 已获得此值?

java - 安装 Oracle J2ME SDK 和 WTK 后 J2ME Palette 为空

android - 如何使用 Coil 从 URL 获取位图?

android - Firebase addListenerForSingleValueEvent 下载使用

android fragment - 数据传递 - 最佳实践

android - 线性布局在设计中可见但在运行时不可见?

android - 使用 android gradle 插件版本 7.0.0-alpha15 时无法使用 kotlin-gradle-dsl 脚本

java - Apache POI 3.9 无法获取 HSSFPalette