Eclipse 可以使用与 Android Studio (intelliJ) 相同的 sdk 吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16846160/
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
Can Eclipse use the same sdk that Android Studio (intelliJ)?
提问by androidevil
I'm using Android Studio, but I need Eclipse at the moment. So, in Window > Preferences > Android, in SDK Location, I choose the sdk location inside my Android Studio folder, that is .../android-studio/sdk, but it can't find the sdk APIs I've installed.
我正在使用 Android Studio,但目前我需要 Eclipse。因此,在 Window > Preferences > Android 中,在 SDK Location 中,我选择了 Android Studio 文件夹中的 sdk 位置,即 .../android-studio/sdk,但它找不到我安装的 sdk API。
And when I try to enter this configuration, it shows:
当我尝试输入此配置时,它显示:
The currently displayed page contains invalid values
Any help?
有什么帮助吗?
Thank you!
谢谢!
回答by AkisC
I know it is late for the answer but if anyone search for this..
我知道答案已经晚了,但如果有人搜索这个..
First you have to set up a common SDK, for example put your SDK folder at the following location C:\Android\sdk
首先你要设置一个通用的SDK,比如把你的SDK文件夹放在下面的位置C:\Android\sdk
Link SDK in your Android Studio, go to File->Project Structure->Android SDK
and point the C:\Android\sdk in Android SDK location.
在您的 Android Studio 中链接 SDK,转到File->Project Structure->Android SDK
并指向 Android SDK 位置中的 C:\Android\sdk。
Link SDK in your Eclipse ADT, go to Eclipse->Preferences->Android
and change the SDK Location to C:\Android\sdk
在 Eclipse ADT 中链接 SDK,转到Eclipse->Preferences->Android
并将 SDK 位置更改为 C:\Android\sdk
*Restart both Eclipse and Android Studio
*重启Eclipse和Android Studio
回答by drew7721
Yes, first install the Android studio. It will instal the SDK in an Android folder under user/AppData/Local/Android/sdk then install Eclipse (unzip). Add the ADT (Android Dev Tools) to Eclipse see : http://developer.android.com/sdk/installing/installing-adt.html
是的,首先安装 Android Studio。它将在用户/AppData/Local/Android/sdk 下的 Android 文件夹中安装 SDK,然后安装 Eclipse(解压)。将 ADT(Android 开发工具)添加到 Eclipse 中,请参见:http: //developer.android.com/sdk/installing/installing-adt.html
Then, once you restart eclipse it will ask you to provide the folder for the SDK, provide the folder where Studio installed it.
然后,一旦您重新启动 eclipse,它会要求您提供 SDK 的文件夹,提供 Studio 安装它的文件夹。
There, both are working with same SDK.
在那里,两者都使用相同的 SDK。
This will save you space on the drive and not have to download and install the SDK twice.
这将节省您的驱动器空间,而不必下载和安装 SDK 两次。
Enjoy.
享受。
回答by drew7721
You can copy your -- .../android-studio/sdk and paste it outside of Android Studio app location, something like /Users/Name/sdk. Then point this /Users/Name/sdk path to eclipse. I think this will solve the problem.
您可以复制您的 -- .../android-studio/sdk 并将其粘贴到 Android Studio 应用程序位置之外,例如 /Users/Name/sdk。然后将此 /Users/Name/sdk 路径指向 eclipse。我认为这将解决问题。