Release Build APK issue | Community
Skip to main content
Newcomer
March 9, 2023
Question

Release Build APK issue

  • March 9, 2023
  • 3 replies
  • 0 views

 Type a.a is defined multiple times: /Volumes/Codebuzz/mobileapp/android/mobilertc/build/.transforms/f96ed62b7f26db4822cd0af21d586d77/transformed/jetified-mobilertc-runtime/classes.dex, /Volumes/Codebuzz/mobileapp/android/app/build/intermediates/external_libs_dex/release/mergeExtDexRelease/classes.dex

    3 replies

    Newcomer
    December 11, 2024

    The error message you're encountering indicates a conflict where the class A.A is defined multiple times in your APK build process. This is common when two different dependencies or libraries include the same class, causing a conflict during the merging process. In your case, it appears the  library is involved.

    Here's how to resolve this issue:

    1. Check Dependencies

    • The issue might be caused by multiple versions of the same library being included in the build. Verify your  files (both project-level and app-level) to ensure you don't have duplicate or conflicting dependencies.

    • Look for the  library and any other libraries that might contain similar classes. Ensure they are using compatible versions. For example:

      groovy
      Copy code
      dependencies { implementation 'com.zoom.sdk:mobilertc:<version>' }

    2. Exclude Duplicate Classes

    • You can exclude the conflicting classes from one of the dependencies using the keyword. For example:
      groovy
      Copy code
      dependencies { implementation('com.zoom.sdk:mobilertc:<version>') { exclude group: 'com.zoom.sdk', module: 'mobilertc-runtime' } }

    3. Clean Project

    • Try cleaning the project to remove any cached artifacts that might be causing issues:
      • In Android Studio: Go to Build > Clean Project and then Build > Rebuild Project.

    4. Check Proguard/R8 Rules

    • If you are using Proguard or R8, it's possible that conflicting rules are causing the issue. Make sure your Proguard configuration doesn't inadvertently keep duplicate classes.

    5. Remove Redundant Libraries

    • If you have libraries that are not essential, remove them to minimize the chances of conflicts.
    Newcomer
    September 6, 2025

    Clean the project. Remove the duplicate library that is added twice. If needed, apply an exclude rule. Enable MultiDex. Then create the release build again.

    Newcomer
    September 11, 2025

    Hi, The error happens because the same class is included more than once in your APK. To fix it: Check your build.gradle for duplicate libraries (like mobilertc-runtime). Exclude duplicates using exclude in your dependencies. Clean and rebuild the project (./gradlew clean then ./gradlew assembleRelease). Also check if any libraries bring in the same class through transitive dependencies. This should fix the “defined multiple times” error.