Android Question Facebook and CardView: Uncaught translation error

Discussion in 'Android Questions' started by Azam Memon, Apr 6, 2019.

  1. Azam Memon

    Azam Memon Member Licensed User

    Hi,

    I am trying to add Facebook analytics and Login to my project which uses CardView Library and I have extended my one of the activities with:

    Code:
    #Extends: android.support.v7.app.AppCompatActivity
    When I am selecting Facebook Library and even without Initializing Facebook library in any of services or activities, I am getting error during Compilation:

    Code:
    B4A Version: 9.00
    Parsing code.    (
    0.50s)
    Building folders structure.    (
    0.11s)
    Compiling code.    (
    0.54s)
    Compiling layouts code.    (
    0.03s)
    Organizing libraries.    (
    0.00s)
    Running custom action.    (
    0.28s)
    Generating R 
    file.    (0.00s)
    Compiling generated Java code.    (
    3.44s)
    Convert byte code - optimized dex.    Error
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v7/cardview/R;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v7/cardview/R$attr;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v7/cardview/R$color;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v7/cardview/R$dimen;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v7/cardview/R$drawable;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v7/cardview/R$
    id;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v7/cardview/R$integer;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v7/cardview/R$layout;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v7/cardview/R$
    string;
    UNEXPECTED TOP-LEVEL 
    EXCEPTION:
    java.lang.RuntimeException: Translation has been interrupted
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:
    696)
        at com.android.dx.command.dexer.Main.runMultiDex(Main.java:
    370)
        at com.android.dx.command.dexer.Main.runDx(Main.java:
    291)
        at com.android.dx.command.dexer.Main.main(Main.java:
    249)
        at com.android.dx.command.Main.main(Main.java:
    94)
    Caused by: java.lang.InterruptedException: Too many errors
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:
    688)
        ... 
    4 more
    I was already using Firebase Analytics (Crashlytics) and Firebase Admob and they were working fine.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    This means that CardView library was not built correctly as it embeds classes from Android Support library instead of linking them.

    I'm not familiar with this library. You can probably use xCustomListView instead: Cards list with CustomListView
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice