Closed edips closed 6 years ago
This look like there's something wrong with the Android build environment.
What versions of these do you have?:
Gradle : gradle-4.1-bin androidSDKr25.2.5 android-ndk-r10e androidSDKr25.2.5/build-tools/25.0.3
I set paths according to setup documentation. And Qt 9.2
I was using minimum api 18 and I tested Android 4.4 device and I get errors. I searched it on stackoverflow and according to this minimum api 21 must be used in order to fix the error. Now I get it worked on Android 7.1 phone. But when I switched the device from Wifi to mobile data it chashed and stopped working. I reopen the app, it works now. There is an ad top of the screen. However when clicking on AdMob no ad loads.
Edit: It works while running for API 23, when it is API 21 it fails to work:
Failed to install /home/edip/Desktop/qfirebase_app/firebase2/build-QtFirebaseExample-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_2_for_Android_armv7-Debug/android-build//build/outputs/apk/android-build-debug.apk: Failure [-26: Package com.blackgrain.android.firebasetest new target SDK 21 doesn't support runtime permissions but the old target SDK 23 does.]
Edit: When clicking AdMob I get those messages from Qt Creator's console:
W Ads : There was a problem getting an ad response. ErrorCode: 0 W Ads : Failed to load ad: 0 W libApp.so: ../extensions/QtFirebase/src/qtfirebaseadmob.cpp:582 (QtFirebaseAdMobBase::load()::<lambda(const firebase::FutureBase&)>): QtFirebaseAdMobRewardedVideoAd(0xba252500) ::load load failed ERROR code: 4 message: An internal SDK error occurred. W Ads : There was a problem getting an ad response. ErrorCode: 0 W Ads : There was a problem getting an ad response. ErrorCode: 0 W Ads : Failed to load ad: 0 W libApp.so: ../extensions/QtFirebase/src/qtfirebaseadmob.cpp:582 (QtFirebaseAdMobBase::load()::<lambda(const firebase::FutureBase&)>): QtFirebaseAdMobNativeExpressAd(0xcc0d33e0) ::load load failed ERROR code: 4 message: An internal SDK error occurred. W Ads : Failed to load ad: 0 W libApp.so: ../extensions/QtFirebase/src/qtfirebaseadmob.cpp:582 (QtFirebaseAdMobBase::load()::<lambda(const firebase::FutureBase&)>): QtFirebaseAdMobBanner(0xcc0d3340) ::load load failed ERROR code: 4 message: An internal SDK error occurred. D libApp.so: qrc:///qml/App.qml:44 (log): qml: QtFirebaseExample LOG RewardedVideoAd failed with error code 4 and message An internal SDK error occurred. W Ads : There was a problem getting an ad response. ErrorCode: 0 D libApp.so: qrc:///qml/App.qml:44 (log): qml: QtFirebaseExample LOG NativeExpressAd failed with error code 4 and message An internal SDK error occurred. W Ads : Failed to load ad: 0 W libApp.so: ../extensions/QtFirebase/src/qtfirebaseadmob.cpp:582 (QtFirebaseAdMobBase::load()::<lambda(const firebase::FutureBase&)>): QtFirebaseAdMobInterstitial(0xba252480) ::load load failed ERROR code: 4 message: An internal SDK error occurred. D libApp.so: qrc:///qml/App.qml:44 (log): qml: QtFirebaseExample LOG Banner failed with error code 4 and message An internal SDK error occurred. D libApp.so: qrc:///qml/App.qml:44 (log): qml: QtFirebaseExample LOG AdMobInterstitial ::onError Interstitial failed with error code 4 and message An internal SDK error occurred. D libApp.so: qrc:///qml/App.qml:44 (log): qml: QtFirebaseExample LOG AdMobInterstitial ::onError Internal error
I've only ever tested with building on API level 23. But the build works from API level 14 and up (I have a test device running 4.1.2 - where it runs without problems). So you should always build with API level 23 or greater. I guess this works because of the appcompat
compatibility libraries.
The errors you get from QtFirebaseAd*
are passed directly from Google's underlying C++ SDK. So the errors are coming from closed source code which we can't do anything about, unfortunately.
This one is clear: ´W Ads : There was a problem getting an ad response. ErrorCode: 0´ - for some reason Google's servers don't respond - maybe you network connection is flaky?
This one is as it says:
RewardedVideoAd failed with error code 4 and message An internal SDK error occurred.
An error inside the SDK (out of our reach).
I've had luck reporting such problems via their quickstart repository.
Thanks for answer. I cannot detect the reason of Firebase SDK error because I don't know anything about c++,c and I am not familiar with Firebase. It is related to Firebase so I close the issue.
Hi. I get errors like 'No resource found that matches the given name 'android:Theme.Material.Light...' on Qt Creator: https://paste.ubuntu.com/26191337/