網頁

2018年6月9日 星期六

[Android Studio] 程式錯誤 - 問與答


問一:The following classes could not be found:
問二:
Failed to find style 'coordinatorLayoutStyle' in current theme
=============================================================

問題一:

The following classes could not be found:
- android.support.design.widget.AppBarLayout (Fix Build Path, Edit XML, Create Class)
- android.support.design.widget.CoordinatorLayout (Fix Build Path, Edit XML, Create Class)
- android.support.design.widget.FloatingActionButton (Fix Build Path, Edit XML, Create Class)
- android.support.design.widget.NavigationView (Fix Build Path, Edit XML, Create Class)
 Tip: Try to build the project.

解答:

設計套裝軟體提供的 API 支援向應用中添加 Material Design 元件和模式。

設計支援函式庫添加了對應用開發者依賴的各種 Material Design 元件和模式的支援,例如抽屜式巡覽列、浮動操作按鈕 (FAB)、快捷資訊欄和標籤頁。

此庫的 Gradle 構建腳本依賴關係識別字如下所示:


implementation ' com.android.support:design:版本編號   '



問題二:

Failed to find style 'coordinatorLayoutStyle' in current theme

解答:

版本編號以下要相同 目前只到 API 27

implementation ' com.android.support:design:版本編號 '

buildToolsVersion 版本編號

targetSdkVersion 版本編號

沒有留言:

張貼留言

影片的問題請留在影片的留言區裡。
部落格不會另外通知給我,所以很難發現你有留言。