我安裝的Android Studio和我開錯誤渲染問題,Android Studio的2.0 Beta版6
呈現問題 下面的類時不能被實例化 android.support.design.widget.FloatingActionButton (...)
我看過幾個論壇下面的錯誤並嘗試了不同的版本,但問題依然存在。
Android Studio version: 2.0 beta 6
SDK: Android 6.0 API 23 revision 2
我將不勝感激,如果你能幫助我
我安裝的Android Studio和我開錯誤渲染問題,Android Studio的2.0 Beta版6
呈現問題 下面的類時不能被實例化 android.support.design.widget.FloatingActionButton (...)
我看過幾個論壇下面的錯誤並嘗試了不同的版本,但問題依然存在。
Android Studio version: 2.0 beta 6
SDK: Android 6.0 API 23 revision 2
我將不勝感激,如果你能幫助我
我覺得Android的工作室公測6是具有渲染FAB,正確的問題。這並不意味着構建/運行可能會失敗,它可能只是一個Studio/GUI錯誤。
一開始(如果你需要的GUI和不需要工廠) 點擊選項卡「文字」(旁邊的「設計」在底部) 並刪除下面的代碼,刪除渲染錯誤:
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:src="@android:drawable/ic_dialog_email" />
終於回去設計了。
(也許你不應該使用這個工作室的金絲雀更新通道,並進入穩定的一個,以避免收到Beta版本)
希望這有助於
open your build.gradle (Module: app) file and change the version
buildToolsVersion "23.x.x" to buildToolsVersion "23.0.1" also change
the version of dependencies :-
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
than rebuild the project....
That's it. :)
邁克爾感謝您的幫助。我刪除了那部分代碼,並且錯誤消失了。 我會考慮不使用該工作室的金絲雀更新頻道。 – Carina