2

Although the same question was asked several times i didnt manage to fix my problem. It has been months since i try to find a solution. Iam using latest Android SDK with latest Google Play Servises v5.0.89....

Images:

Properties: Properties

Build Path: Build Path

Proguard: Proguard

Activity.Java: Activity.Java

Manifest: Manifest

Activity.Xml: Activity.Xml

ashoke
  • 6,441
  • 2
  • 26
  • 25
user3887668
  • 119
  • 1
  • 1
  • 7

1 Answers1

0

are you testing on device or emulator ? In your first screenshot (properties), you seem to have picked generic target, try with google api target as shown below:

google api target

Also, i notice you have 2 compat libraries in build path...i would pick one.

Please see this sample , i was able to quickly test it on emulator:

adview on emulator

ashoke
  • 6,441
  • 2
  • 26
  • 25
  • Nop, Google APIs didnt change anything. As for Compat, 2 libraries are added automatically and google recommends to keep them both. Also when application loads on emulator i get messeges on console like: not enough space to show at only xx dp available/ no fill from ad server/failed to load ad: 3 etc. Even editing the size of the add on xml doesnt change anything. – user3887668 Sep 24 '14 at 20:04
  • can you please [run this sample](https://github.com/googleads/googleads-mobile-android-examples/tree/master/admob/BannerExample) to rule out issues with your emulator. I just ran this example, and i see adview no problem. – ashoke Sep 24 '14 at 20:36
  • Imported the sample added compat & services and i still game the same...http://i.imgur.com/dd1zW1G.png – user3887668 Sep 24 '14 at 22:28
  • you are not running inside emulator yet. That is at design time inside IDE, and i see that error too in my IDE. Once I run it on emulator, i do not see the error. Please see my screenshot above. – ashoke Sep 24 '14 at 22:31
  • Application stops as soon as it gets launched. – user3887668 Sep 24 '14 at 23:15
  • is it your app or the example. can you please [check logcat](http://stackoverflow.com/questions/3280051/how-to-enable-logcat-console-in-eclipse-for-android) messages. – ashoke Sep 24 '14 at 23:26
  • seems it fails to find main class, i suspect your eclipse build config is not working. [This sample project](https://github.com/googleads/googleads-mobile-android-examples/tree/master/admob/BannerExample) comes with gradle build, can you please [try with android studio](https://developer.android.com/sdk/installing/studio.html). Or try with a blank workspace in eclipse, only import this sample with no other app. – ashoke Sep 25 '14 at 22:09
  • Its the same sample you sent me to try before...My eclipse is fresh i just downloaded the latest from android sdk and the only project i created was a test project to test ads. – user3887668 Sep 25 '14 at 22:42
  • it is the same sample project, it works for me in android studio. I believe eclipse is not building the sample properly, so the problem seems to be with eclipse + new build tools. – ashoke Sep 26 '14 at 05:45