我试图导入从Android的使用新的抽屉式导航栏所需的类 http://developer.android.com/design/patterns/navigation-drawer.html#ImpactOnNav
DrawerLayout: http://developer.android.com/reference/android/support/v4/widget/DrawerLayout.html
ActionBarDrawerToggle: http://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle.html
进口android.support.v4.widget.DrawerLayout不能得到解决 进口android.support.v4.app.ActionBarDrawerToggle不能得到解决。
我已经更新了库到最新版本,但还是这些类不被识别。
解决方案如何更新的JAR文件的库?
我通常通过复制文件做到这一点。你会发现里面 $ ANDROID_SDK /演员/安卓/支持
,其中 $ ANDROID_SDK
是无论你的Android SDK是JAR文件安装。
如果你使用Eclipse,如果复制这种在文件系统级别,而Eclipse是开放的,preSS < F5>
与项目的软件包管理器高亮这样的Eclipse拿起变化。更简单的是将其拖出SDK的拖放JAR成库/
权在Eclipse中,这都将更新文件系统,让Eclipse的了解的变化。
这有可能是Eclipse的选项添加JAR文件(右键单击以上项目,然后选择Android的工具>添加支持库...从上下文菜单中)也将这样做。我由于一些特殊性与我的开发环境,特定的方法是行不通的。
I'm trying to import the classes required to use the new "Navigation Drawer" from Android http://developer.android.com/design/patterns/navigation-drawer.html#ImpactOnNav
DrawerLayout: http://developer.android.com/reference/android/support/v4/widget/DrawerLayout.html
ActionBarDrawerToggle: http://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle.html
The import android.support.v4.widget.DrawerLayout cannot be resolved The import android.support.v4.app.ActionBarDrawerToggle cannot be resolved
I have updated the libraries to the latest version but still these classes are not recognized.
解决方案How do I update the JARs in libs?
I usually do it by copying the file. You will find the JARs inside $ANDROID_SDK/extras/android/support
, where $ANDROID_SDK
is wherever your Android SDK is installed.
If you use Eclipse, if you copy this at the filesystem level, and Eclipse is open, press <F5>
with the project highlighted in Package Manager so Eclipse picks up the changes. Easier is to drag it out of the SDK and drop the JAR into libs/
right in Eclipse, which will both update the filesystem and let Eclipse know about the change.
It's possible that the Eclipse option to add the JARs (right-click over the project, then choose Android Tools > Add Support Library... from the context menu) will also do this. That particular approach doesn't work for me due to some peculiarities with my development environment.
相关推荐
最新文章