Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by jrfapplications · Feb 06, 2018 at 08:47 AM · animationandroidpluginadmobjava

Admob plugin error: Java.Lang.ClassNotFoundException: com.google.android.gms.ads.mobileads

Since switching my build method from internal to gradle I can no longer get the admob plugin to work for unity, the following error is received in logcat:


 > 02-05 22:45:56.281: E/Unity(23488):
 > AndroidJavaException:
 > java.lang.ClassNotFoundException:
 > com.google.android.gms.ads.MobileAds
 > 02-05 22:45:56.281: E/Unity(23488):
 > java.lang.ClassNotFoundException:
 > com.google.android.gms.ads.MobileAds
 > 02-05 22:45:56.281: E/Unity(23488):
 >     at
 > java.lang.Class.classForName(Native
 > Method) 02-05 22:45:56.281:
 > E/Unity(23488):     at
 > java.lang.Class.forName(Class.java:453)
 > 02-05 22:45:56.281: E/Unity(23488):
 >     at
 > java.lang.Class.forName(Class.java:378)
 > 02-05 22:45:56.281: E/Unity(23488):
 >     at
 > com.unity3d.player.UnityPlayer.nativeRender(Native
 > Method) 02-05 22:45:56.281:
 > E/Unity(23488):     at
 > com.unity3d.player.UnityPlayer.c(Unknown
 > Source:0) 02-05 22:45:56.281:
 > E/Unity(23488):     at
 > com.unity3d.player.UnityPlayer$c$1.handleMessage(Unknown
 > Source:151) 02-05 22:45:56.281:
 > E/Unity(23488):     at
 > android.os.Handler.dispatchMessage(Handler.java:101)
 > 02-05 22:45:56.281: E/Unity(23488):
 >     at
 > android.os.Looper.loop(Looper.java:164)
 > 02-05 22:45:56.281: E/Unity(23488):
 >     at
 > com.unity3d.player.UnityPlayer$c.run(Unknown
 > Source:20) 02-05 22:45:56.281:
 > E/Unity(23488): Caused by:
 > java.lang.ClassNotFoundException:
 > Didn't find class
 > "com.google.android.gms.ads.MobileAds"
 > on path: DexPathList[[zip file
 > "/data/app/com.jrfapplications.eggscapade-iB1I9-hArZyWPiiLr_s9zA==/base.apk"],nativeLibraryDirectories=[/data/app/com.jrfapplications.eggscapade-iB1I9-hArZyWPiiLr_s9zA==/lib/arm,
 > /data/app/com.jrfapplications.eggscapade-iB1I9-hArZyWPiiLr_



Unity Version: 2017.3.0f3

Android SDK Tools Version: 25.2.5

Admob Plugin: https://github.com/googleads/googleads-mobile-unity/releases/tag/v3.11.0

I have done a force resolve to no avail as well. Any help would be appreciated.

Thanks

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
11
Best Answer

Answer by jrfapplications · Feb 07, 2018 at 08:07 PM

I resolved this by changing the player settings 'Minify' under publish settings from proguard to none.

Comment
Add comment · Show 9 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image _Xertz_ · Jul 12, 2018 at 09:49 PM 0
Share

I just want to thank you, after two days of bashing my head at this problem, your solution finally worked. Thanks.

avatar image OfficeThrashing · Jul 20, 2018 at 05:51 AM 0
Share

Thanks It works.

avatar image GengarGames777 · Aug 26, 2018 at 03:03 PM 0
Share

This doesnt work as it already is set to none for me.

avatar image OfficeThrashing · Aug 28, 2018 at 10:02 AM 0
Share

try re import

avatar image AdityaViaxor · Oct 29, 2018 at 04:45 AM 0
Share

Hello i cant find $$anonymous$$ify where it is and how to get it.i mean where it is what is proguard in my publish setting i can only find keystore setting please help

Show more comments
avatar image
6

Answer by Tortuap · Jan 14, 2019 at 04:58 PM

If you haven't used the Minify option in your build, then it looks like you're not including the required Google Play dependencies in your Unity project. Ensure the required AAR and JAR files are located in the Assets/Plugins/Android directory. You can perform dependency resolution by selecting Assets -> Play Services Resolver -> Android Resolver ->Resolve in the Unity editor.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Gibs_ · Sep 12, 2020 at 03:46 PM 1
Share

In my case just Resolve by itself didn't work, but Force Resolve did the trick. Thanks!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

272 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I know if I'm calling a plugin correctly? 0 Answers

Unity 5 seems to can't find my Android Plugin 0 Answers

How do I override an Android Java class in Unity? 1 Answer

How do you access a custom Java class from Unity? 1 Answer

Problem in android java plugin 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges