I cannot get ZXing to work in Android Studio. I have generated the core.jar file using Ant, and the same jar worked fine using Eclipse. Now I must get it working in Android Studio (0.3.2).
Here is what I have tried but to no avail so far:
Copy the core.jar file into the PROJECTNAMEProject/PROJECTNAME/libs/
Right click > Add as library
Choose Project Library as the 'Level' in
the Create Library dialog, with 'Add to module' set to the
PROJECTNAME folder. I have tried the Global and Module library types
as well as Project library.
Add compile files('libs/core.jar') to
the dependencies section of the
PROJECTNAMEProject/PROJECTNAME/build.gradle
The error I'm getting seems to be telling me I'm including the jar twice:
Gradle: UNEXPECTED TOP-LEVEL EXCEPTION:
Gradle: java.lang.IllegalArgumentException: already added: Lcom/google/zxing/BarcodeFormat;