在Android Studio中改變佈局時,我得到的錯誤:找不到任何android.support.v4.widget Android Studio中
以下類找不到:
- android.support.v4.widget.DrawerLayout (Fix Build Path, Create Class)
或
以下類找不到:
- android.support.v4.widget.SwipeRefreshLayout (Fix Build Path, Create Class)
並且它不顯示任何佈局。我已經像這樣設置了Gradle:
dependencies {
compile project(':libraryfab')
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:support-v4:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.0'
compile files('libs/apache-mime4j-0.6.jar')
compile files('libs/httpmime-4.1.3.jar')
compile files('libs/jetbrains-annotations.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/picasso-2.4.0.jar')
compile files('libs/pinchzoom.jar')
compile files('libs/universal-image-loader-1.9.3-with-sources.jar')
compile files('libs/volley.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
}
安裝了Android支持庫。在此項目從Eclipse項目導入之前。如果我使用導航抽屜活動創建了一個新項目(使用android.support.v4.widget.DrawerLayout
),它看起來像是起作用並顯示佈局。
轉到SDK管理器和下載Android的支持庫,看看 – Nabin
@Nabin Android支持庫已經安裝了先生.. –
您是否運行過「級別清潔」? –