ClassNotFoundException: Didn't find class “com.google.android.gms.ads.AdView”

前端 未结 3 814
花落未央
花落未央 2020-11-27 07:56

I did a lot of research and this seems to be a common error for many users but for very different reasons. None of which I found worked for me.

I\'m getting

3条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 08:16

    I did what @user1684030 said (upgraded Android SDK Build Tools; changed compiler to 1.7), but not worked for me. I've written the solution that I found in case it could help anyone with the same problem:

    In the step 3 of Setting Up Google Play Services says:

    In your app project, reference Google Play services library project. See Referencing a Library Project for Eclipse for more information on how to do this.

    Note: You should be referencing a copy of the library that you copied to your development workspace—you should not reference the library directly from the Android SDK directory.

    Solution: Don't do the copy manually. Instead just check the box in Eclipse that says "Copy projects into workspace"

    I did it so and everything worked again.

    Thanks to this StackOverFlow question: How to fix Google Play Services 2 Library install to Eclipse (Admob is part of Google Play Services)

提交回复
热议问题