I cannot get ZXing to work in Android Studio. I created the core.jar file using Ant, and the same jar worked fine using Eclipse. Now I have to get it working in Android Studio (0.3.2).
Here is what I tried, but haven’t understood anything yet:
- Copy core.jar to PROJECTNAMEProject / PROJECTNAME / libs /
- Right Click> Add As Library
- Select “Project Library” as “Level” in the “Create Library” dialog box, with the words “Add to Module”, PROJECTNAME Folder. I tried the Global and Module library types as well as the project libraries.
- Add
compile files('libs/core.jar') to the dependencies section PROJECTNAMEProject / Projectname / build.gradle
The error I get seems to tell me that I turn on the jar twice:
Gradle: UNDEFINED FUEL EXCEPTION: Gradle: java.lang.IllegalArgumentException: already added: Lcom / google / zxing / BarcodeFormat;
android-studio jar zxing
Daniel Wilson Dec 02 '13 at 17:47 2013-12-02 17:47
source share