0

I'm trying to import a list of classes (.class files ) into my blank activity android project ( on Android Studio) All I've done is copy these files to /libs in the directory of the project how can I import these classes to MainActivity.java to use them ?

infinity911
  • 201
  • 1
  • 9
  • Does this helps you? http://stackoverflow.com/questions/16615038/what-is-the-shortcut-to-auto-import-all-in-android-studio or http://stackoverflow.com/questions/22272524/how-to-auto-import-the-necessary-classes-in-android-studio-with-shortcut – Xose Sanchez Mar 04 '16 at 09:44
  • No, as I see, I need to convert these classes to one Jar file, – infinity911 Mar 04 '16 at 09:46
  • I am unable to convert it through the command line, I should add jar to the environment variables . but how? @XoseSanchez – infinity911 Mar 04 '16 at 09:46

1 Answers1

0

All you have to do is change package in those classes to your package. For example, in class imported.class find first line and edit package to match your package - in this example package com.mycompany.exampleapp.libs;.
Than, you can work with your class as usual:

MyClass object;  
object = new MyClass();  
...  
...
Sheler
  • 3,969
  • 3
  • 12
  • 21