Android Studio
ziggy42 opened this issue · 22 comments
I'd like to add Caldroid in my project. I'm currently using android studio as IDE, and I can't find the right way to import the library. What should I do?
it would be perfect if you provide a .jar file :)
Does this link help? http://stackoverflow.com/questions/16588064/how-do-i-add-a-library-project-to-the-android-studio
Caldroid contains resource files, so Android cannot package it as .jar file. However if you can import other libraries (e.g ActionBarSherlock), then importing Caldroid should be similar. I leave your issue open so hopefully other can help
Thanks for the link but it didn't help me. I found the solution by myself.
On your android studio project, create a new module library:
File -> New Module -> Android Library
In your build.gradle file, in the dependencies section, add:
compile project(':YourLibraryName')
Then copy all the Caldroid java and xml files in the right folder of your lib.
I recommend to set as package name the one that is set in Caldroid, don't make mine mistake, I had to rename a looot of things :D
Thanks, now I can finally use this library :)
Thank you for this, I'd update the documentation for other as well
Hi, i would like to know if i can use this code as a template for my own app.
I tried to do my own calendar using the class CalendarView, but i can´t insert buttons to go forward and backwards month by month.
I need the part of creating the calendar, the buttons of the months and the insert data in a day that i want.
Thank you so much.
@AitorMihashi yes you can use it in any way you want, free or commercial, just make sure you comply with MIT License and include the license in your project
How can i include the licence in my project?
El 08/04/2014 11:41, "Thomas Dao" notifications@github.com escribió:
@AitorMihashi https://github.com/AitorMihashi yes you can use it in any
way you want, free or commercial, just make sure you comply with MIT
License and include the license in your projectReply to this email directly or view it on GitHubhttps://github.com//issues/110#issuecomment-39829212
.
Well I'm not a lawyer and frankly I don't really care what you do with this code, you can use in any way you want. However follow MIT License protects both you and me, so you can either include a link to the license file in this repo in your source code, or copy the license file to your own project. Btw this's not legal advice, so consult a lawyer if you have one.
Hm, i just cloned the Calendroid git on my disk.
Then in Android Studio:
File -> Import Module.
Select the library folger from cloned git and add it.
You should have a library folder in your AndroidStudio now.
I renamed it to Calendroid (right click -> refactor -> rename) First the dir, then the module.
Then goto:
File -> Project Structure -> Modules. Select -> Dependencies.
Add Module dependency.
Select the Calendroid module
Synch your gradle / make Project and voilà :)
I just wanted to pitch into the conversation, because I think I experienced the most painless way to convert my project to an Android Studio one.
I was working on Eclipse the whole time, so this is what I did.
- Launch Android Studio
- Import Project > Navigate to your Eclipse project's root directory.
- Done. It auto-imported my Caldroid lib into a module.
Which version of Android Studio are you using? I can't seem to import as a module at all.
Android-Studio 0.8.6
I am using the same version, maybe there is something in 0.8.6 that is causing issues.
Well, I'll try to rollback.
I am still unable to add this library, Android Studio says 'Select modules to import' when I select the library folder.
For latest version i Just create new module and Andorid library and paste the code from git to it.
I tried that, I tried to copy the files directly into my own src directory, I tried using a new gradle file so that it would actually import and still nothing. It never is able to be built.
Yes, i tried it and doesn't work.
@jackjamieson Have you found the solution?
You try the compile with android 4.2 ?
brunocascio, can you share you project as archive i think it will be faster way to solve you problem.
Hi I had used caldroid library, I have to display only two months from today date how can I do this.