Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loading AdMobPlusPlugin #594

Open
ingojoseph opened this issue Jul 6, 2023 · 8 comments
Open

Error loading AdMobPlusPlugin #594

ingojoseph opened this issue Jul 6, 2023 · 8 comments

Comments

@ingojoseph
Copy link

Describe the bug
After installing Admob Plus Capacitor plugin with npm install @admob-plus/capacitor, and running ionic cap sync android, I get the following error when starting my Android app:

Error loading plugins.
  com.getcapacitor.PluginLoadException: Could not find class by class path: admob.plus.capacitor.AdMobPlusPlugin
  at com.getcapacitor.PluginManager.loadPluginClasses(PluginManager.java:35)
  at com.getcapacitor.BridgeActivity.onCreate(BridgeActivity.java:32)

Has anyone else got the same issue and was able to fix it?

Environment

  AdMob Plus Environment Info:
    System:
      OS: macOS Monterey 12.5
      CPU: (8) arm64 Apple M2
      Memory: 185.91 MB / 16.00 GB
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 19.6.1 - /opt/homebrew/bin/node
      Yarn: 1.22.19 - /opt/homebrew/bin/yarn
      npm: 9.4.0 - /opt/homebrew/bin/npm
    Managers:
      CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
    Utilities:
      Clang: 14.0.0 - /usr/bin/clang
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
      Android SDK:
        API Levels: 32, 33
        Build Tools: 30.0.3, 33.0.1
        System Images: android-33 | Google APIs ARM 64 v8a
    IDEs:
      Android Studio: 2021.3 AI-213.7172.25.2113.9123335
      Xcode: 14.1/14B47b - /usr/bin/xcodebuild
    npmPackages:
      typescript: ^4.1.3 => 4.9.5 
    Cordova:
      Version: 
You have been opted out of telemetry. To change this, run: cordova telemetry on.
12.0.0 (cordova-lib@12.0.1)
    Ionic:
      Version: 6.20.4
    AndroidManifest.xml:
      Version: -
@ratson
Copy link
Member

ratson commented Jul 9, 2023

@ingojoseph I am not sure what cause the error.
Do you see admob-plus-capacitor in android/capacitor.settings.gradle?
Or setup a test repo for me to check.

@pieshop
Copy link

pieshop commented Aug 4, 2023

Im getting the same issue. Building to a Samsung Tab A, Android 11

android/capacitor.settings.gradle

include ':admob-plus-capacitor'
project(':admob-plus-capacitor').projectDir = new File('../node_modules/@admob-plus/capacitor/android')

The error Im getting in android studio:

Error loading plugins.
com.getcapacitor.PluginLoadException: Could not find class by class path: admob.plus.capacitor.AdMobPlusPlugin
	at com.getcapacitor.PluginManager.loadPluginClasses(PluginManager.java:35)
	at com.getcapacitor.BridgeActivity.onCreate(BridgeActivity.java:31)
	at android.app.Activity.performCreate(Activity.java:8207)
	at android.app.Activity.performCreate(Activity.java:8191)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3819)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4022)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2336)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:246)
	at android.app.ActivityThread.main(ActivityThread.java:8653)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

@pieshop
Copy link

pieshop commented Aug 7, 2023

A follow up - when I install this all other capacitor plugins are also no longer available (Device, FileSystem, Network etc). Uninstall and the plugins are available again.

@kisimediaDE
Copy link

kisimediaDE commented Aug 24, 2023

I have also a problem with the capacitor plugin.

I get this error message:

File: https://localhost/main.da3c3b98d4af59fb.js - Line 1 - Msg: ERROR Error: Uncaught (in promise): Error: "AdMobPlus" plugin is not implemented on android
Error: "AdMobPlus" plugin is not implemented on android

When the AdMobPlus plugin is installed all the other capacitor plugins are not working anymore.
Without the plugin everything is fine.

Here is a small basic example: https://github.com/kisimediaDE/IonicTest
It has just the basic template for "Ionic - Tab" and then outputs the info of the App plugin in the explore-container and should show a banner (app.component.ts)

Without AdMobPlus the App plugin is working as expected. With this plugin is not working anymore.

@Lpn01
Copy link

Lpn01 commented Sep 1, 2023

I can also confirm this issue. It started happening after the update from Capacitor 3 to Capacitor 4.

Does anyone have any alternative plugins that they would recommend while this gets sorted out?

@EYALIN
Copy link

EYALIN commented Sep 3, 2023

@Lpn01 @kisimediaDE you can use my forked plugin "community-admob-plus-cordova"
https://github.com/EYALIN/community-admob-plus/tree/master/packages/cordova

people here approved it is worked with Capacitor as well

@Lpn01
Copy link

Lpn01 commented Sep 3, 2023

@EYALIN Thanks for the suggestion. I already switched to @capacitor-community/admob and I'm still testing it to see if I'm happy with the way it works. I'm considering your plugin as well.

@StrongTS
Copy link

StrongTS commented Oct 5, 2023

How to fix: Go back to using admob plus version 1.24.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants