我如何安装支持库android?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11533090/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can i install support library android?
提问by Fernando Santiago
I need to work with the android-support-v4, buy when i try to install it from SDK manager (support library), it does not show me the package, actually i wanted to install another API level, but i can not either, because the sdk manager does not show me any other API than the ones i have already installed. Here is an image of the SDK manager:
How can i show everything i need? (i already tryied with the obsolete option).
我需要使用 android-support-v4,当我尝试从 SDK 管理器(支持库)安装它时购买,它没有向我显示包,实际上我想安装另一个 API 级别,但我也不能,因为 sdk 管理器没有向我显示除我已经安装的 API 之外的任何其他 API。这是 SDK 管理器的图像:
如何显示我需要的所有内容?(我已经尝试过使用过时的选项)。
回答by Stephan Branczyk
You're asking the wrong question.
你问错了问题。
Right-click on your project.
右键单击您的项目。
Select Android Tools > Add Support Libraries...
选择 Android Tools > Add Support Libraries...
(a progress bar will appear, and voila it should download what you need)
(会出现一个进度条,瞧它应该下载你需要的东西)
By the way, you should really install the latest android-sdk update. From your screenshot, it doesn't look like you have yet.
顺便说一句,你真的应该安装最新的 android-sdk 更新。从您的屏幕截图来看,您似乎还没有。
回答by Asiddeen bn Muhammad
click on "Packages" > "Show Obsolete Packages"
点击“包”>“显示过时的包”
回答by Max Peck
By "select android tools" you mean "select android sdk tools"? This one is not expandable, by the way. (at least not on my android sdk manager).
“选择 android 工具”是指“选择 android sdk 工具”?顺便说一下,这个是不可扩展的。(至少不是在我的 android sdk 管理器上)。
The "support library" does not appear in any of the other branches of the android sdk manager.
“支持库”不会出现在 android sdk 管理器的任何其他分支中。
Is there any repository need to be added to the sdk manager in order to obtain the package?
是否需要将任何存储库添加到 sdk 管理器才能获取包?
I'm using MacOSX lepard and the latest sdk, and got the same screenshot as above.
我正在使用 MacOSX lepard 和最新的 sdk,并得到与上面相同的屏幕截图。
回答by Niclas Hedhman
With the new SDK Manager installed, you will find the "Android Support Library" under Extras (if sorted by API level) or under the repository "Google Inc" (if sorted by Repository).
安装新的 SDK 管理器后,您将在 Extras(如果按 API 级别排序)或存储库“Google Inc”(如果按存储库排序)下找到“Android 支持库”。
I had exactly the same view as above, searched all over the Net, incl this post, and couldn't find anything. By the time I gave up, it suddenly showed in my listings. It seems that I had some network issues (possibly combined with latest version).
我和上面的观点完全一样,在网上搜索,包括这篇文章,但没有找到任何东西。当我放弃时,它突然出现在我的列表中。看来我有一些网络问题(可能与最新版本相结合)。
回答by Dhana
I too faced the same issue and figured out the below solution.
我也遇到了同样的问题并想出了以下解决方案。
Tools -> Manage Add-on Sites -> Enable "Google Inc."
工具 -> 管理附加站点 -> 启用“Google Inc.”