简体   繁体   English

Eclipse vs AndroidStudio中的支持库

[英]support library in Eclipse vs AndroidStudio

I tried to build Eclipse project that references android.support.design library (CoordinatorLayout and FAB inside it). 我试图构建引用android.support.design库(其中包含CoordinatorLayout和FAB)的Eclipse项目。 I copied into my workspace android.support.v7.recyclerview library project and sucesfuly built it. 我将其复制到我的工作区android.support.v7.recyclerview库项目中,并成功构建了它。 Then did the same with appcompat-v7. 然后使用appcompat-v7进行相同操作。 That enabled me to build design library (previously also copied into workspace) which goes OK. 这使我能够构建设计库(以前也复制到工作区中),一切正常。 Finally I built project, that references design library. 最后,我建立了引用设计库的项目。 Everything went well, designer presented good preview (API23), but running on device (API 17) didn't succeed- LogCat express disability to inflate CoordinatorLayout. 一切进展顺利,设计师展示了不错的预览效果(API23),但是在设备上运行(API 17)却没有成功-LogCat表示无法提高CoordinatorLayout的功能。 TargetSDK was 17 and compilerSDk was 23. My support library is 23.1 version. TargetSDK是17,compilerSDk是23。我的支持库是23.1版本。

When making the same project in Android Studio (everything was wizard generated), I faced no problems. 在Android Studio中制作相同的项目时(一切都是由向导生成的),我没有遇到任何问题。 I noticed the same dependencies in gradle file, and SDKs are same as in Eclipse. 我注意到gradle文件中的依赖项相同,并且SDK与Eclipse中的相​​同。 Why those diferencies and where did I go wrong ? 为什么这些差异以及我哪里出了错?

You mean you have problems on Eclipse but none in Android Studio? 您的意思是您在Eclipse上遇到了问题,但在Android Studio中却没有? Try lowering the compilerSDk or raising the TargetSDK to the latest release. 尝试降低编译器SDk或将TargetSDK升级到最新版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM