与进口的Andr​​oid平台类问题 [英] Problems with importing Android platform classes

查看:152
本文介绍了与进口的Andr​​oid平台类问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Andr​​oid。这似乎已经有太多的问题,刚开日食和SDK安装的一切只是它应该的。我一直在努力从Android开发人员网站的例子,但它抛出一个错误说:

  

进口android.support不能得到解决。

我试图导入以下内容:

 进口android.support.v4.app.NavUtils;
 

我有三个安装了最新的SDK平台的版本,也安装了1版支持库。是的android.jar文件指向错误的文件夹?我发现该文件夹/文件,我试图导入但我不知道他们是否在正确的地方。

  

C:\ Program Files文件   (86)\机器人\ Android的SDK \来源\ Android为16 \机器人\支持

我没有感动,因为我安装了一切东西,所以我很困惑,为什么其他所有的事情将导入,但支持类失踪。在此先感谢您的帮助。

解决方案
  

但它扔我一个错误说进口android.support解决不了的

android.support。* 系列的包来自于Android的支持包(我认为你是叫转。10支持库。

  

我有三个安装了最新的SDK平台版本,并已安装1版支持库

Android的支持套餐并不只需要下载到您的开发计算机,但它也需要被添加到您的项目。如果您使用的是Eclipse,右键单击了在Package Explorer项目并选择Android的工具>添加支持库,将其添加到您的项目。如果你没有使用Eclipse,发现在你的SDK安装的 Android的支持 - v4.jar 文件,并复制到项目的库/ 目录。

I'm new to Android. It seems there have been way too many problems just getting eclipse and the SDK setup with everything just where it should be. I've been working on an example from the Android Developer website, but it's throwing an error saying:

The import android.support cannot be resolved

I'm trying to import the following:

import android.support.v4.app.NavUtils;

I have three of the newest SDK platform versions installed and also have the rev.10 support library installed. Is the android.jar file pointing to the wrong folder? I found the folder/files that I'm trying to import but I'm wondering if they're in the right place.

C:\Program Files (x86)\Android\android-sdk\sources\android-16\android\support

I haven't moved anything since I installed everything, so I'm confused why most everything else will import but the support classes are missing. Thanks in advance for the help.

解决方案

but it's throwing me an error saying "The import android.support cannot be resolved"

Everything in the android.support.* series of packages comes from the Android Support package (what I think you are calling "rev. 10 support library".

I have three of the newest SDK platform versions installed and have rev.10 support library installed

The Android Support package does not only need to be downloaded to your development machine, but it also needs to be added to your project. If you are using Eclipse, right-click over your project in the Package Explorer and choose Android Tools > Add Support Library to add it to your project. If you are not using Eclipse, find the android-support-v4.jar file in your SDK installation and copy that to your project's libs/ directory.

这篇关于与进口的Andr​​oid平台类问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆