我的 android 應用程式的 styles.xml 的第 5 行有一個錯誤,內容如下
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="Theme.AppCompact.Light.NoActionBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="Theme.MaterialComponents">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
我正在用 Flutter 構建一個 android 應用程式。此錯誤使我無法訪問某些小部件。我該如何解決?我不知道為什么會出現此錯誤或可能導致它的原因。
這是一個截圖

通常,我不應該有這些錯誤,因為它是由 Flutter 框架本身生成的檔案。我從來沒有遇到過這樣的問題。不過,我注意到每當我洗掉帶有專案標簽的行時,錯誤就會清除
uj5u.com熱心網友回復:
在線號。4 它應該AppCompat代替AppCompcat,在這種情況下是未知詞。
PS 同樣在我(Android 和 Flutter 開發)的經驗中,大多數情況下,當發生未知單詞/字符錯誤時,它會發生在錯誤日志顯示的先前代碼行/塊中。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/528315.html
