Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Studio #110

Closed
ziggy42 opened this issue Mar 19, 2014 · 22 comments
Closed

Android Studio #110

ziggy42 opened this issue Mar 19, 2014 · 22 comments

Comments

@ziggy42
Copy link

ziggy42 commented Mar 19, 2014

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?

@ziggy42
Copy link
Author

ziggy42 commented Mar 20, 2014

it would be perfect if you provide a .jar file :)

@thomasdao
Copy link
Contributor

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

@ziggy42
Copy link
Author

ziggy42 commented Mar 21, 2014

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 :)

@thomasdao
Copy link
Contributor

Thank you for this, I'd update the documentation for other as well

@AitorMihashi
Copy link

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.

@thomasdao
Copy link
Contributor

@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

@AitorMihashi
Copy link

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 project

Reply to this email directly or view it on GitHubhttps://github.com//issues/110#issuecomment-39829212
.

@thomasdao
Copy link
Contributor

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.

@fabsimilian
Copy link

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à :)

@bytehala
Copy link

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.

  1. Launch Android Studio
  2. Import Project > Navigate to your Eclipse project's root directory.
  3. Done. It auto-imported my Caldroid lib into a module.

@brunocascio
Copy link

I tried install with android-studio and not work..

I get Error:Configuration with name 'default' not found.

EDIT:

My configuration now work, but it seem not imported...

captura de pantalla de 2014-08-13 20 34 45

sin nombre

Help me?

@jackjamieson
Copy link

Which version of Android Studio are you using? I can't seem to import as a module at all.

@brunocascio
Copy link

Android-Studio 0.8.6

@jackjamieson
Copy link

I am using the same version, maybe there is something in 0.8.6 that is causing issues.

@brunocascio
Copy link

Well, I'll try to rollback.

@jackjamieson
Copy link

I am still unable to add this library, Android Studio says 'Select modules to import' when I select the library folder.

@Fornori
Copy link

Fornori commented Aug 15, 2014

For latest version i Just create new module and Andorid library and paste the code from git to it.

@jackjamieson
Copy link

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.

@brunocascio
Copy link

Yes, i tried it and doesn't work.

@brunocascio
Copy link

@jackjamieson Have you found the solution?

You try the compile with android 4.2 ?

@Fornori
Copy link

Fornori commented Aug 20, 2014

brunocascio, can you share you project as archive i think it will be faster way to solve you problem.

@gr8guyramesh
Copy link

Hi I had used caldroid library, I have to display only two months from today date how can I do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants