Android Question Errors adding AdMob to my app

Discussion in 'Android Questions' started by Alberto Michelis, Jul 12, 2019.

  1. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    B4A 8.80
    Having followed all steps to add AdMob to my app.
    Getting errors I downloaded and updated the SDK Manager and Install all of it suggests.
    Recompile my app without AdMob is OK

    Compiling with AdMob
    Im gettin this errors...

    Generando el fichero R. Error
    C:\b4android\SourceCode\PortIt_AdMov\Objects\bin\extra\res3\res\values\values.xml:36: error: Attribute "fontProviderFetchStrategy" already defined with incompatible format.
    C:\b4android\SourceCode\PortIt_AdMov\Objects\bin\extra\res8\res\values\values.xml:42: Original attribute defined here.
    C:\b4android\SourceCode\PortIt_AdMov\Objects\bin\extra\res3\res\values\values.xml:51: error: Attribute "fontProviderFetchTimeout" already defined with incompatible format.
    C:\b4android\SourceCode\PortIt_AdMov\Objects\bin\extra\res8\res\values\values.xml:54: Original attribute defined here.
    C:\b4android\SourceCode\PortIt_AdMov\Objects\bin\extra\res3\res\values\values.xml:61: error: Attribute "fontStyle" already defined with incompatible format.
    C:\b4android\SourceCode\PortIt_AdMov\Objects\bin\extra\res8\res\values\values.xml:62: Original attribute defined here.

    What can I do?
     
  2. asales

    asales Well-Known Member Licensed User

  3. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Yes, and I follow all the steps to use it.
     
  4. asales

    asales Well-Known Member Licensed User

  5. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Ive installed a new AndroidSDK from scratch
    Run the new SDK manager and installed all
    Test to compile with the new AndroidSDK many of my apps and all is ok
    Then add again the AdMob, compile and got this errors

    Generando el fichero R. (0.79s)
    Compilando el código del motor de depuración. (10.55s)
    Compilando el código Java generado. (10.60s)
    Convirtiendo byte code a dex optimizado. Error
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/INotificationSideChannel;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/INotificationSideChannel$Stub;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/INotificationSideChannel$Stub$Proxy;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/IResultReceiver;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/IResultReceiver$Stub;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/IResultReceiver$Stub$Proxy;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/ResultReceiver;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/ResultReceiver$1;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/os/ResultReceiver$MyResultReceiver;
    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.lang.RuntimeException: Translation has been interrupted
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:692)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:315)
    at com.android.dx.command.dexer.Main.runDx(Main.java:293)
    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:684)
    ... 4 more
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Create a new project and add FirebaseAdMob. Are you able to compile?
     
  7. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Yes
    Generando el fichero R. (0.69s)
    Compilando el código del motor de depuración. (1.43s)
    Compilando el código Java generado. (2.73s)
    Convirtiendo byte code a dex optimizado. (33.59s)
    Empaquetando ficheros. (2.94s)
    Copiando los recursos de librerias (0.16s)
    Found 21 resource files.
    Firmando ficheros de paquete (clave privada) (2.47s)
    ZipAlign file. (0.08s)

    Compile the original app ok
    Just adding the FirebaseAdMob lib to the project, without any reference to it or any change in the manifest, I compile and get the errors shown in my previous post.
    Dont know what to look for...
    Landroid/support/v4/ does not exists...
    How can I fix it?
     
    Last edited: Jul 14, 2019
  8. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Fixed it doenloading the old versions SDK
     
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