找不到Flutter样式资源

时间:2019-03-28 14:41:00

标签: flutter flutter-dependencies

Flutter Version: v1.0.0 stable 
Windows 10 
Android Studio 3.3.2

我正在尝试在模拟器上运行Flutter应用程序,但收到以下调试消息。

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  Output:  error: resource style/TextAppearance.Compat.Notification.Info (aka com.example.homer:style/TextAppearance.Compat.Notification.Info) not found.
  error: resource style/TextAppearance.Compat.Notification.Info (aka com.example.homer:style/TextAppearance.Compat.Notification.Info) not found.
  error: resource style/TextAppearance.Compat.Notification.Info (aka com.example.homer:style/TextAppearance.Compat.Notification.Info) not found.
  error: resource style/TextAppearance.Compat.Notification (aka com.example.homer:style/TextAppearance.Compat.Notification) not found.
  error: resource style/TextAppearance.Compat.Notification (aka com.example.homer:style/TextAppearance.Compat.Notification) not found.
  error: resource style/TextAppearance.Compat.Notification (aka com.example.homer:style/TextAppearance.Compat.Notification) not found.
  error: resource style/TextAppearance.Compat.Notification.Time (aka com.example.homer:style/TextAppearance.Compat.Notification.Time) not found.
  error: resource style/TextAppearance.Compat.Notification.Time (aka com.example.homer:style/TextAppearance.Compat.Notification.Time) not found.
  error: resource style/TextAppearance.Compat.Notification.Time (aka com.example.homer:style/TextAppearance.Compat.Notification.Time) not found.
  error: resource style/TextAppearance.Compat.Notification.Title (aka com.example.homer:style/TextAppearance.Compat.Notification.Title) not found.
  error: resource style/TextAppearance.Compat.Notification.Title (aka com.example.homer:style/TextAppearance.Compat.Notification.Title) not found.
  error: resource style/TextAppearance.Compat.Notification.Title (aka com.example.homer:style/TextAppearance.Compat.Notification.Title) not found.
  error: failed linking references.

  Command: C:\Users\Merv Merzoug\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\ea0864e983313bfd344a542393f352f8\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
          C:\Users\Merv Merzoug\AppData\Local\Android\sdk\platforms\android-27\android.jar\
          --manifest\
          C:\Users\Merv Merzoug\homer\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
          -o\
          C:\Users\Merv Merzoug\homer\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
          -R\
          @C:\Users\Merv Merzoug\homer\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
          --auto-add-overlay\
          --java\
          C:\Users\Merv Merzoug\homer\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
          --custom-package\
          com.example.homer\
          -0\
          apk\
          --output-text-symbols\
          C:\Users\Merv Merzoug\homer\build\app\intermediates\symbols\debug\R.txt\
          --no-version-vectors
  Daemon:  AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

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

* Get more help at https://help.gradle.org

BUILD FAILED in 21s
Finished with error: Gradle task assembleDebug failed with exit code 1

我尝试过的方法: 我发现有this个帖子似乎与同一问题很接近,但我不认为这是版本问题。

我还发现了this帖子,建议删除.gradle / caches,但我不清楚此目录在哪里...

我还尝试根据this

将样式添加到styles.xml文件中

还有其他人遇到此错误吗?

0 个答案:

没有答案