Skip to content

Building problems. Duplicate entries in BuildConfig.class #37

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

Open
k3t0 opened this issue Jan 3, 2017 · 7 comments
Open

Building problems. Duplicate entries in BuildConfig.class #37

k3t0 opened this issue Jan 3, 2017 · 7 comments

Comments

@k3t0
Copy link

k3t0 commented Jan 3, 2017

Dear Sandro,

thank you for putting this together. Unfortunately the build process fails for me for both release v1.1.1 and v1.1.0. I'm building with Studio 2.2.3 and JRE 1.8.0_76-release-b03-amd64 and try to run on

  • Android 5.1 API 22 or on
  • Android 7.1 API 25.
    However, the *.apk files you released do work for me. So the problem should be on my side. Still I would appreciate and hope to get some help on it.

If I clean and rebuild the app, the building works, but when I try to run the app I get:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/local/android-studio/jre/bin/java'' finished with non-zero exit value 2

If I use the option:

   multiDexEnabled true

I get:

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/sandro/openalpr/BuildConfig.class

Thank you for any help on this,
k3t0

@SandroMachado
Copy link
Owner

SandroMachado commented Jan 7, 2017

Hi @k3t0

Can you try to use in your project the buildToolsVersion "23.0.1"?

@k3t0
Copy link
Author

k3t0 commented Jan 18, 2017

Dear Sandro,

thank you for your reply.

I'm trying to compile and run an unmodified version of your code. So, I was using buildToolsVersion "23.0.1". I'm now trying to run on a Marshmallow system, but I get the same error.

If I simply build the project, all is well and it logs build successful. Once I try to run/build the apk, however, it exits with the error message shown above.

I understand it's not your job helping me solve my setup issues. Still I'd appreciate any help/idea.
Kind regards,
k3t0

@SandroMachado
Copy link
Owner

@k3t0 you need to disable instant run. Can you please try it and give feedback?

@DipuDipanshu
Copy link

ya I'm getting the same error...in spite of following your all instruction

@ThinkingXuan
Copy link

I'm getting the same error...in spite of following your all instruction too.

@pedrolaranjeiro
Copy link

I had a similar issue. My project had a library module and I had the same package name for both app and library. This was creating the conflict. After I change the library name in the AndroidManifest, it compiled.

@mehulTank
Copy link

i am getting same issue my version is 28 how can i solve this i have add already added multidex but still not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants