How add AdMob in program?



  • Hi!
    How I can add AdMob in my program?


  • Lifetime Qt Champion

    Hi,

    The folks from V-Play have a plugin for that.
    There's also a project called QtAdMob. I haven't tried it though.



  • I use QtAdMob.
    I am using this example. But it is not compiled by the Android compiler.
    Please help me understand this example.


  • Lifetime Qt Champion

    What about giving some more details about is happening with that application ?



  • @SGaist said in How add AdMob in program?:

    What about giving some more details about is happening with that application ?

    It should appear advertising. More application does nothing. The MinGW compiler compiles it, but the Android compiler does not compile it. When I changed my xml-file by this example, I also stopped compiling.


  • Lifetime Qt Champion

    Can you show the exact error you are getting ?



  • FAILURE: Build failed with an exception.

    • Where:
      Build file 'D:\QTProject\QtAdMobApp-master\build-QtAdMobApp-Android_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build.gradle' line: 17

    • What went wrong:
      A problem occurred evaluating root project 'android-build'.

    Failed to apply plugin [id 'com.android.application']
    Gradle version 2.2 is required. Current version is 4.6. If using the gradle wrapper, try editing the distributionUrl in D:\QTProject\QtAdMobApp-master\build-QtAdMobApp-Android_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\gradle\wrapper\gradle-wrapper.properties to gradle-2.2-all.zip

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    • Get more help at https://help.gradle.org

    BUILD FAILED in 30s
    -- Skipping D:/QT/5.12.0/android_armv7/plugins/iconengines/libqsvgicon.so. It has unmet dependencies: lib/libQt5Svg.so.
    -- Skipping D:/QT/5.12.0/android_armv7/plugins/imageformats/libqsvg.so. It has unmet dependencies: lib/libQt5Svg.so.
    Building the android package failed!
    -- For more information, run this command with --verbose.
    14:50:11: Процесс «D:\QT\5.12.0\android_armv7\bin\androiddeployqt.exe» completed with code 14.
    Error when building / installing the QtAdMobApp project (bundle: Android for armeabi-v7a (Clang Qt 5.12.0 for Android ARMv7))
    During the “Build Android APK” stage
    14:50:11: Elapsed time: 00:55.


  • Lifetime Qt Champion

    Then you should contact the author of the module, he'll likely be able to help you faster with his module.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.