找不到符号变量 ic_launcher

cannot find symbol variable ic_launcher

我正在尝试在 Android Studio 中为 Android Wear 构建一个空的默认项目。我收到此错误:

Error:(23, 41) error: cannot find symbol variable ic_launcher
Error:Execution failed for task ':wear:compileDebugJava'.
> Compilation failed; see the compiler error output for details.

我是可穿戴应用开发的新手。任何指针都会有帮助。

P.S.: 我没有对代码做任何改动。

您的可绘制文件夹是空的。在其中放置一个名称为 "ic_launcher"

的图标

您需要将 "ic_launcher" 图标从 mipmap-hdpi 文件夹复制到 drawable 文件夹。我遇到了同样的问题,它帮了大忙!

或者通过调用 R.mipmap.ic_launcher

来引用 mipmap 资源