Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import a java package in Android Studio

I'm new in android, and I want to import the jfftpack to my project in android studio anda i don't know how to import it.

The original code was import ca.uol.aig.realdoublefft and I'don't know where to put the java files. I've tried to put them to a libs folder.

here's the jfftpack source code:

like image 879
user3027891 Avatar asked Nov 24 '13 18:11

user3027891


1 Answers

If it's an existing code library, I'd recommend adding a module for it. Probably the easiest way is to use the File menu command to add a new module, let it create a plain Java (non-Android) module for you, remove the sample class it puts into the module, and then copy your files over into it and tweak it. The module wizard will take care of setting up the directories and build files for you, and you can look at it later and see what did.

like image 163
Scott Barta Avatar answered Sep 20 '22 01:09

Scott Barta