2

I've been searching the web for half a day now but I just can't figure out how to create a new Android Library with Android Studio. I've tried doing things like this: How to create a library project in Android Studio and an application project that uses the library project But when I enter the New Module menu it just says "Nothing to show". I can't find out why or how to fix it. Is there a way to manually add a library? If so, how? I'm trying to add an import method to my app so users can import a preferably rar file or just a folder to be used in the app.

TL;DR: How can I add the option Android Library to my New Module menu inside Android Library?

EDIT: To clarify things; I've made a web app in which u can create your own click/touch-able interface. The projects u make with that app can be exported to a rar file which is basicly a webpage with html, css and javascript that runs the project. I can run that webpage in my android app just fine but I need other users to be able to import the files somehow. So I was thinking about using a file manager so users can import the files into the app. I'm working with this one a.t.m. https://code.google.com/p/afiledialog/ but it needs to be a library.

Community
  • 1
  • 1
Rudi
  • 111
  • 9
  • I've added the project via File -> import module and proceeded on via the instructions given here: http://stackoverflow.com/a/16617332/2709981 After that I was able to target the project via import. But I received some errors, after some google-ing I've added compile project(':aFileChooser') to the dependencies of my main project resulting in only having one error left namely; Gradle: A problem occurred configuring project ':Xmedia_System_Editor'. > Failed to notify project evaluation listener. > Configuration with name 'default' not found. – Rudi Aug 23 '13 at 10:08
  • I've tried adding sourceSets to the aFileChooser library but that didn't work. I've ran out of search results so I'm going to tinker with it and see if I can get it fixed. If anyone knows the answer to this problem I'm still open to feedback. – Rudi Aug 23 '13 at 10:09
  • you aren't the only one to have these issues. For example, why don't you try an open source library - such as Couchbase Lite (database library). I run into similar problems. But maybe we can try to find out the magic gradle syntax ;) https://github.com/couchbase/couchbase-lite-android – RoundSparrow hilltx Aug 28 '13 at 00:08
  • I've had to stop working on it cause I've got some other projects with a deadline coming up soon. For now I resulted into just getting the data from the sd-card and the users will have to add the data themself via usb-cable or whatever and make sure it is in the right folder. (I did make it so the folder gets created when running the app for the first time). Thanks for the link though, RoundSparrow hilltx. I'll try that one out when we have less projects here at the office :P. – Rudi Aug 29 '13 at 12:24
  • Good luck Rudi - your work hours of life sounds anything but idle ;) – RoundSparrow hilltx Aug 30 '13 at 05:49

1 Answers1

0

Updated my Android Studio today and guess what, it's fixed! So anyone who has this problem just update asap. Tried this on Mac and Windows and it now works on both.

PS: I'm on version 0.2.6 now (version of august 24). Guess I was one day too early with the question :P

Rudi
  • 111
  • 9
  • Uhh, when you say "it's fixed," what exactly is fixed? I'm struggling with something similar, but I'm not sure it's the same problem. – Cubs Fan Ron Sep 11 '13 at 02:29
  • Sorry for the late reply. The option to add a new library is available now, unlike before where the option list was empty. (At the new module menu) – Rudi Dec 10 '13 at 07:45