• 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
0
Question by EpicHero · Jun 01, 2018 at 06:25 AM · androidadsadmobgoogledependencies

Unity + Admob dependencies

Unity 17.3.1f1 Google Mobile Ads Unity Plugin v3.13.1

Whatever I do, Unity never finds the needed dependencies. Logcat always says:

05-31 05:51:10.040: E/Unity(4692): AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.ads.MobileAds 05-31 05:51:10.040: E/Unity(4692): java.lang.ClassNotFoundException: com.google.android.gms.ads.MobileAds 05-31 05:51:10.040: E/Unity(4692): at java.lang.Class.classForName(Native Method) 05-31 05:51:10.040: E/Unity(4692): at java.lang.Class.forName(Class.java:308) 05-31 05:51:10.040: E/Unity(4692): at java.lang.Class.forName(Class.java:272) 05-31 05:51:10.040: E/Unity(4692): at com.unity3d.player.UnityPlayer.nativeRender(Native Method) 05-31 05:51:10.040: E/Unity(4692): at com.unity3d.player.UnityPlayer.c(Unknown Source) 05-31 05:51:10.040: E/Unity(4692): at com.unity3d.player.UnityPlayer$c$1.handleMessage(Unknown Source) 05-31 05:51:10.040: E/Unity(4692): at android.os.Handler.dispatchMessage(Handler.java:98) 05-31 05:51:10.040: E/Unity(4692): at android.os.Looper.loop(Looper.java:135) 05-31 05:51:10.040: E/Unity(4692): at com.unity3d.player.UnityPlayer$c.run(Unknown Source) 05-31 05:51:10.040: E/Unity(4692): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.MobileAds" on path: DexPathList[[zip file "/data/app/com.duckonthewater.ouch-1/base.apk"],nativeLibraryDirectories=[/data/app/com.duckonthewater.ouch-1/lib/x86, /vendor/lib, /system/lib]] 05-31 05:51:10.040: E/Unity(4692): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 05-31 05:51:10.040: E/Unity(4692): at java.lang.ClassLoader.l

So it doesn't find the dependencies, I guess. I copied "play-services-ads-12.0.1.aar" to the Plugins/Android Folder but it doesn't help.

Also tried to work with the other resolve package "play-services-resolver-1.2.72.0.package" and with another admop package "admob_unity_plugin.unitypackage" but nothing is working....

I guess this whole automatic dependecies crap is not working at all for me, whatever I try (but Unity always says "it worked"). So I would like to know which dependencies/plugins I need to put where to solve the problem manually.

Comment
Add comment · Show 2
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 ZachariBarnes · Jun 06, 2018 at 04:08 PM 0
Share

I'm also having this issue.

avatar image EpicHero ZachariBarnes · Jun 06, 2018 at 10:22 PM 0
Share

I fixed it this way. $$anonymous$$aybe it helps you too.

  1. I found out that the import of the plugin wasn't done without errors (->Console). This was my solution: https://forum.unity.com/threads/unity-admob-error.275279/ (Actually it was another page but i don't find it anymore....the problem was that the JAVA_Home value was not set).

  2. Assets-> Play Services Resolver -> Android Resolver -> Settings -> UNcheck Use Gradle Daemon

  3. Assets-> Play Services Resolver -> Android Resolver -> Force Resolve

Then everything worked :)

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

193 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

Related Questions

I am not getting reward after the ad (Admob) 0 Answers

How do I enable AdMob to respond to inputs? 0 Answers

admob related question 2 Answers

Unity and Admob using latest Play Services Plugin 7 Answers

Google Admob Ads not showing. Test ADS works well, but not my real AD ID 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges