RE: [google-admob-ads-sdk] Fatal Exception: android.content.ActivityNotFoundException | android.gms.ads.AdActivity (ADMOB)

730 views
Skip to first unread message
Message has been deleted

Mobile Ads SDK Forum Advisor Prod

unread,
Nov 3, 2019, 10:52:36 PM11/3/19
to brun...@gmail.com, google-adm...@googlegroups.com

Hi Bruno,

Thank you for reaching out to us, and for providing extensive details on your concern.

This is an intriguing concern. It is possible that ProGuard might be stripping the activity off your final build if you were using it in the first place. You may try the following fixes and see if they would work for you:

  • Include com.google.android.gms.ads.AdActivity in your AndroidManifest.xml.
  • Include -keep class com.google.android.gms.ads.** { *; } in your proguard-rules file if you are using it.


If the situation persists despite the above, could you then provide the details below (via Reply privately to author) so that I can investigate the issue further?

  • Names of Android devices on where this issue occurs
  • Copy of your sample project (reproducing this issue), and steps on how to reproduce it; I'm afraid that we'll be strictly needing this in order to proceed with our investigation


Regards,
Ziv Yves Sanchez
Mobile Ads SDK Team



ref:_00D1U1174p._5001UMucZK:ref

BRUNO IAN SAINT ESTEVEN

unread,
Nov 4, 2019, 12:09:35 PM11/4/19
to Google Mobile Ads SDK Developers
Hi Ziv.
Thanks for answering.

I was using - -keep public class com.google.android.gms.ads.**

The strange party is that is the only project, and a few are with the same implementation... And does not happen to everyone... but to every android version....
I will add the activity to the manifest and I will report...

Thanks!
Bruno.

Leonardo Corder

unread,
May 25, 2020, 1:14:58 PM5/25/20
to Google Mobile Ads SDK Developers
I'm also facing same problem here, using play-services-ads version 19.1.0

On Saturday, November 2, 2019 at 12:01:25 PM UTC-3, BRUNO IAN SAINT ESTEVEN wrote:
Since today at an amazing speed Admob is crashing when trying to display an Add according to Firebase.

Also Crashlytics is not getting the mapping... do not know why

This happens in every version of android 4, 5, 6, 7, 8, 9, 10.

Fatal Exception: android.content.ActivityNotFoundException
Unable to find explicit activity class {com.myCompany.myApp/com.google.android.gms.ads.AdActivity}; have you declared this activity in your AndroidManifest.xml?
com.myCompany.myApp.GameActivity.E

android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1933)
android
.app.Instrumentation.execStartActivity (Instrumentation.java:1616)
android
.app.ContextImpl.startActivity (ContextImpl.java:904)
android
.app.ContextImpl.startActivity (ContextImpl.java:882)
android
.content.ContextWrapper.startActivity (ContextWrapper.java:383)
com
.google.android.gms.internal.ads.Di.a (Unknown Source:9)
com
.google.android.gms.ads.internal.overlay.zzn.a (Unknown Source:77)
com
.google.android.gms.internal.ads.KC.a (Unknown Source:76)
com
.google.android.gms.internal.ads.zu.a (Unknown Source:9)
com
.google.android.gms.internal.ads.cF.showInterstitial (Unknown Source:24)
com
.google.android.gms.internal.ads.Cea.c (Unknown Source:7)
com
.google.android.gms.ads.InterstitialAd.c (Unknown Source:2)
com
.myCompany.myApp.GameActivity.E (Unknown Source:82)
com
.myCompany.myApp.X.onClick (Unknown Source:4)
android
.view.View.performClick (View.java:6390)


Tried to reproduce the error locally, but couldn't
This started suddenly... and is in the only app that I'm getting that error in Firebase (all are implemented the same way)



Gradle
dependencies {
...
    implementation
'com.google.android.gms:play-services-ads:18.2.0'
    implementation
'com.google.firebase:firebase-core:17.2.0'
    implementation
'com.crashlytics.sdk.android:crashlytics:2.10.1'  
...
}


<b>MANIFEST</b>

<?xml version="1.0" encoding="utf-8"?>
         package="com.myCompany.MyApp"
         android:installLocation="auto">

<uses-permission android:name="android.permission.VIBRATE"/>  
<uses-permission android:name="android.permission.INTERNET"/>  
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>

    <supports-screens
       android:anyDensity="true"
       android:largeScreens="true"
       android:normalScreens="true"
       android:resizeable="true"
       android:smallScreens="true"
       android:xlargeScreens="true"
       />

    <application
       android:allowBackup="true"
       android:fullBackupContent="true"
       android:icon="@mipmap/ic_launcher"
       android:label="@string/app_name"
       android:largeHeap="true"
       android:roundIcon="@mipmap/ic_launcher_round"
       android:supportsRtl="true"
       android:theme="@style/AppTheme"
       >

        <uses-library
           android:name="org.apache.http.legacy"
           android:required="false"/>
       <meta-data
           android:name="com.google.android.gms.ads.AD_MANAGER_APP"
           android:value="true"/>
       <meta-data
           android:name="com.google.android.gms.ads.APPLICATION_ID"
           android:value="THENUMBERFORMYADMOB"/>
       <service
           android:name=".services.MusicService"
           android:enabled="true"/>

        <meta-data
           android:name="firebase_crashlytics_collection_enabled"
           android:value="${crashlyticsCollectionEnabled}" />

        <activity
           android:name=".SplashActivity"
           android:label="@string/app_name">
           <intent-filter>
               <action android:name="android.intent.action.MAIN"/>
               <action android:name="android.intent.action.VIEW"/>
               <category android:name="android.intent.category.LAUNCHER"/>
           </intent-filter>
       </activity>
       <activity
           android:name=".LevelsActivity"
           android:label="@string/title_activity_game"
           android:parentActivityName=".SplashActivity">
       </activity>
       <activity
           android:name=".GameActivity"
           android:keepScreenOn="true"
           android:label="@string/title_activity_game"
           android:parentActivityName=".LevelsActivity">
       </activity>

        ...
       OTHER ACTIVITIES
       ...    
 
  </application>
</manifest>


I implemented Admob accordingly to the guide.
¿Should I add an Admob activity?

In google play crash report I'm getting reports regarding 

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
WebViewGoogle.apk

  #00  pc 00000000008fca14  /system/app/WebViewGoogle/WebViewGoogle.apk

But this has been for a long time (since 1' July... when started suddenly with a spike...) and google is "fixing it"... could this be related?

Hantu Duit

unread,
May 25, 2020, 1:17:30 PM5/25/20
to Leonardo Corder, Google Mobile Ads SDK Developers

why sent me this


--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/053046e1-60c6-47ad-b453-6e98a35e8935%40googlegroups.com.

Mobile Ads SDK Forum Advisor Prod

unread,
May 26, 2020, 12:28:39 AM5/26/20
to leo.c...@gmail.com, google-adm...@googlegroups.com

Hi Leonardo,

 

Thank you for reaching out to us.

 

Could you kindly try the following below, and see if these would fix the issue?

  • Include com.google.android.gms.ads.AdActivity in your AndroidManifest.xml.
  • Include -keep class com.google.android.gms.ads.** { *; } in your proguard-rules file if you are using it.

 

If the situation persists despite the above, could you then kindly provide the details below (via Reply privately to author) so that I can further investigate the issue?

  • Copy of a sample project (reproducing the issue)
  • Steps to replicate the issue

 

Regards,

Ziv Yves Sanchez

Mobile Ads SDK Team



ref:_00D1U1174p._5004Q1zrlys:ref

Mobile Ads SDK Forum Advisor Prod

unread,
May 26, 2020, 12:28:40 AM5/26/20
to hantu...@gmail.com, google-adm...@googlegroups.com

Hi Hantu,

 

Thank you for reaching out to us.

 

You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.

 

Regards,

Hantu Duit

unread,
May 26, 2020, 12:29:57 AM5/26/20
to Mobile Ads SDK Forum Advisor Prod, Google Mobile Ads SDK Developers

tq

Mobile Ads SDK Forum Advisor Prod

unread,
May 28, 2020, 1:35:21 PM5/28/20
to leo.c...@gmail.com, google-adm...@googlegroups.com
Hi Leonardo,

I work with Ziv and will try to help. Unfortunately unreplicable bugs are the hardest to fix because you cannot study them. If you are interested in pursuing replicability in an unsupported way let me shoot ideas at you. You have mentioned that it's happening in many versions of Android. Can you pinpoint any specific device models? Is it on a specific interstitial creative? If you ever can capture a crash caused by a creative then you can make an app based on our sample apps with minimum extra code isolating the creative so that it crashes reliably. You can also log creatives used in Crashlytics following this doc - https://developers.google.com/admob/android/crashlytics. You may also want to use the Ad Review Center to ban ads that you catch causing crashes. It would help others to make an app that reliably crashes though. I also wonder how did you fair with what stackoverflow had to offer?

Kind regards,
Aryeh Baker

Mobile Ads SDK Team
 

ref:_00D1U1174p._5004Q1zrlys:ref

BRUNO IAN SAINT ESTEVEN

unread,
May 28, 2020, 6:32:01 PM5/28/20
to Google Mobile Ads SDK Developers
My problem got fixed just by recompiling and uploading a new version to the play store...
weird thing...
Reply all
Reply to author
Forward
0 new messages