How to import an Android Library Project created on Android Studio into existing Eclipse Android App Project, as library?

て烟熏妆下的殇ゞ 提交于 2019-12-12 03:37:26

问题


What I want to do is to add this GitHub - Custom-Calendar-View Android Library Project created on Android Studio.

I read a lot of questions and answers about, on SO, but none fits my case. How can to this? Need to export a .jar from Android Library Project on Android Studio? if so, how? Also its important to me to use the resources of Custom-Calendar-View library.

Any help?


回答1:


This is my small suggestion you can use the below link and this is the Calendar Control developed using eclipse. If possible you can use this one.

https://github.com/Rajendhiran/AndroidCalendarWidgetLibrary

This has the swipe gesture feature as well.




回答2:


You can simply compile the library into a jar file and then import in Eclipse. By Default Gradle provides building a jar from source code. See the example,

// Include dependent libraries in archive.
mainClassName = "com.company.application.Main"

jar {
  manifest { 
    attributes "Main-Class": "$mainClassName"
  }  

  from {
    configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
  }
}

You can check other solutions for building a jar with dependencies using Gradle here!



来源:https://stackoverflow.com/questions/39036702/how-to-import-an-android-library-project-created-on-android-studio-into-existing

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