Cannot compile CastCompanionLibrary in Eclipse

我怕爱的太早我们不能终老 提交于 2019-12-25 12:07:17

问题


I want to use CastComponaionLibrary but I'm using Eclipse and not Android Studio. So I created a new project and copied all CastCompanionLibrary sources into it. I also added references to:

  • android-support-v7-appcompat
  • android-support-v7-mediarouter
  • google-play-services_lib

In this new project I get these compilation errors:

  • The project was not built since its build path is incomplete. Cannot find the class file for android.support.v4.app.ActionBarDrawerToggle$DelegateProvider. Fix the build path then try building this project
  • The type android.support.v4.app.ActionBarDrawerToggle$DelegateProvider cannot be resolved. It is indirectly referenced from required .class files VideoCastControllerActivity.java

any ideas? Thanks!


回答1:


First, you don't need to include v4 library since that is part of the v7 libraries, so remove that. Then follow the instructions in this G+ community post




回答2:


I don't know why but I solved this problem:

  • In android.support.vX -> Properties -> Java Build Path -> Projects -> Add
  • Choose the related project/s to the android.support.vX
  • Press OK
  • Do the same and remove the project/s added


来源:https://stackoverflow.com/questions/22686667/cannot-compile-castcompanionlibrary-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!