3

My question might be very simple but I cant find the answer: For my android project I try to implement https://github.com/iPaulPro/aFileChooser In the installation instructions we find:

Add aFileChooser to your project as an Android Library Project.

with a link to http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject When i follow the link point 1 is :

 1. Make sure that both the project library and the application project 
 that depends on it are in your workspace. 
 If one of the projects is missing, import it into your workspace.

How should I do this points ? zip aFileChooser into the main folder, or do i need to right click on app and create new Package or something ?

Note : im using android studio and followed the tutorial in the comments, but android studio dosnt recognize the project as a library. I got the project from github by downloading the zip.

Sven van den Boogaart
  • 11,833
  • 21
  • 86
  • 169
  • https://www.youtube.com/watch?v=1MyBO9z7ojk Great tutorial. – Sven van den Boogaart Jun 03 '15 at 19:07
  • that tutorial didnt work - I get the error Error:Configuration with name 'default' not found. im trying exact same library, did you get it to work? can you say how? – Tintinabulator Zea Jul 07 '15 at 20:05
  • @TintinabulatorZea i didnt get it to work, i decided to create my own file choser. – Sven van den Boogaart Jul 08 '15 at 00:37
  • do you have any idea how now? xD i think it needs a gradle but it doesnt have one... its weird how difficult they make it to install their product -.- Also i got https://github.com/jfmdev/aFileDialog/blob/master/docs/UserGuide.md to work instead but the ui is uglier. I just did include 'lib:lib1:app' after following vid instructions – Tintinabulator Zea Jul 08 '15 at 02:14
  • how do you make your own file chooser btw? where do you start ? is there something you extend? – Tintinabulator Zea Jul 08 '15 at 02:15
  • 1
    @TintinabulatorZea It's very simple you can use something like http://www.christophbrill.de/de_DE/how-to-create-a-android-file-browser-in-15-minutes/ or just google for file browser android tutorial – Sven van den Boogaart Jul 08 '15 at 12:37

2 Answers2

3

1 - In your project's "main" root directory (where the res, java and AndroidManifest.xml file located) create a new folder:

/libs

2- Paste your library in newly created

/libs

folder. Now just download ZIP from Github, rename library directory to "aFileChooser" and copy it.

3 - In app/build.gradle add your library project as an dependency:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile project(":aFileChooser")
}
Prokash Sarkar
  • 11,723
  • 1
  • 37
  • 50
-1

To resolve this problem:

  • Download and unzip the library
  • In your project go to file-> new -> import module -> click on the small button at the right and choose the library that you are downloaded ->ok NOTE: INTO 'aFileChooser-master' THERE ARE 2 FOLDERS: aFileChooser AND aFileChooserExample. YOU SHOULD SELECT aFileChooser
  • Now go to file -> project structure -> select the tab 'app' at the left ->select the tab 'dependencies' -> click on the plus button -> choose module dependencies -> select the library ->ok
  • Finish. Now you can use the classes of the library in your project.
Thomas Fritsch
  • 9,639
  • 33
  • 37
  • 49
Ahmad Zahabi
  • 1,110
  • 12
  • 15
  • Welcome to SO and thanks for contributing. If you could format your answers with bullet points or similar it would be easier for others to read :) – Luke Cousins Nov 11 '17 at 13:59