-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate entry error #21
Comments
Hi @ExCx , I haven't known that issue before. Have you tried to remove the duplicate classes in the corresponding jar file followed by creating a new jar? |
Hmm, no. It seemed a little bit complicated to me, so I didn't even try. As you see, in that SO link they suggested this repackaged version to overcome this issue: https://github.com/andruhon/android5xlsx So I tried to add that library instead and my project is built without problems. Now, I can work with that library too. But your sample codes seem much more practical for my situation. That lib don't seem have a direct solution like "xlsx->java object" which I absolutely need. |
well, let's see how I can help you with the problem. I can give a try to eliminate duplicated classes from the jar but we must prepared ourselves for any obscure results. if you share with me a simple POC project that gives that error is a good starting point, I think. |
Ok, now I tried to build a clean project and found the problem. It's because I need to use Java 1.8 compatibility. Set the target and source compatibility in module settings or place this into the gradle file and you'll see:
|
so it works now right? |
It works without the compatibility mode alright. But if anyone wants to use the new features of Java 8 in Android Studio 3, he/she will face the same problem for sure. For me, it's not urgent really. I only used Java 8 for lambda expressions to shorten my code. So, I changed some lines here and there to their Java 7 versions and it works now. I believe, sooner or later you have to look into it, though. Anyway, thanks for this beautiful library. I'll get in contact if I find any more issues. |
I keep in my mind the problem.
Thank you @ExCx :) and please do so when you have it |
Any solution for using Java 8?
Without the Java 8, it is works normally |
we can open it up until we receive any other issue with this |
Hi, I added your library to my gradle and when I try to build my project it threw this error:
I found it here that this issue is related to POI having same class names with javax or something like that.
Your last commit is pretty new though. I guess it's my mistake but I cannot find a solution, and I didn't see it mentioned anywhere in this repository.
The text was updated successfully, but these errors were encountered: