0

image here

In the picture you can see the libs folder and it contans two sub folders and a jar file named unity classes. I want to merge this project with my android studio project so in this case i want to copy my eclipse project java files, res folder and libs and everything. I copied everything in my android studio project but confused that how to copy libs folder from eclipse to android studio. I know that there is a compile ' ' option in build.gradle but what to write their? I am a newbie so please tell me what to do? I just want these libs folder to be written in android studio

  • Check on google _Migrate eclipse project to Android Studio_ – Piyush Oct 19 '16 at 10:53
  • Sir as i mentioned i want to merge eclipse project in my android studio project thats why i want these libs folder to be merge in android studio – Arslan Ali Oct 19 '16 at 10:55

2 Answers2

0

I found the answer finally. Its simple and i just have to add this line

dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
0

Create a libs folder

  • -Add your jars to this folder(Copy and paste them).
  • -Right click on the jar-> Synchronize 'your.jar name'

Finally just add below code in your gradle, This will add all the jars

dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
}

You can also add separate jar by :

compile files('libs/yourJarName.jar')
Anurag
  • 1,162
  • 6
  • 20