在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支持库已经安装了先生.. –
您是否运行过“级别清洁”? –