2

I have been searching this for like 3 days and still din't find any solution.

I have already read the answers of the questions:

and many more... so please don't call it a duplicate because i am not using google maps anywhere and all above questions were related to maps.

If anyone really wants to help, i will share my complete project with him + bounty.

04-12 20:49:17.570: E/GooglePlayServicesUtil(3661): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
04-12 20:49:17.630: E/ActivityThread(3661): Activity com.xxx.xxx.XXXActivity has leaked ServiceConnection bbn@b3558278 that was originally bound here
04-12 20:49:17.630: E/ActivityThread(3661): android.app.ServiceConnectionLeaked: Activity com.xxx.xxx.XXXActivity has leaked ServiceConnection bbn@b3558278 that was originally bound here
04-12 20:49:17.630: E/ActivityThread(3661):     at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:936)
04-12 20:49:17.630: E/ActivityThread(3661):     at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:830)
04-12 20:49:17.630: E/ActivityThread(3661):     at android.app.ContextImpl.bindService(ContextImpl.java:1126)
04-12 20:49:17.630: E/ActivityThread(3661):     at android.content.ContextWrapper.bindService(ContextWrapper.java:370)
04-12 20:49:17.630: E/ActivityThread(3661):     at xo.b(SourceFile:90)
04-12 20:49:17.630: E/ActivityThread(3661):     at xo.a(SourceFile:118)
04-12 20:49:17.630: E/ActivityThread(3661):     at ud.d(SourceFile:88)
04-12 20:49:17.630: E/ActivityThread(3661):     at ud.b(SourceFile:129)
04-12 20:49:17.630: E/ActivityThread(3661):     at ua.a(SourceFile:239)
04-12 20:49:17.630: E/ActivityThread(3661):     at ua.a(SourceFile:176)
04-12 20:49:17.630: E/ActivityThread(3661):     at aas.a(SourceFile:118)
04-12 20:49:17.630: E/ActivityThread(3661):     at abz.run(SourceFile:14)
04-12 20:49:17.630: E/ActivityThread(3661):     at acb.run(SourceFile:30)
04-12 20:49:17.630: E/ActivityThread(3661):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
04-12 20:49:17.630: E/ActivityThread(3661):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
04-12 20:49:17.630: E/ActivityThread(3661):     at java.lang.Thread.run(Thread.java:856)
04-12 20:49:17.650: W/ResourceType(3661): getEntry failing because entryIndex 14 is beyond type entryCount 3
04-12 20:49:17.650: W/ResourceType(3661): Failure getting entry for 0x7f0b000e (t=10 e=14) in package 0 (error -2147483647)
04-12 20:49:17.650: E/GooglePlayServicesUtil(3661): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
04-12 20:49:17.660: W/ResourceType(3661): getEntry failing because entryIndex 14 is beyond type entryCount 3
04-12 20:49:17.660: W/ResourceType(3661): Failure getting entry for 0x7f0b000e (t=10 e=14) in package 0 (error -2147483647)
04-12 20:49:17.660: E/GooglePlayServicesUtil(3661): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
04-12 20:49:18.360: I/Ads(3661): Ad request cancelled.

XML file:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:ads="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".XXXActivity" >

    <ListView
        android:id="@+id/list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        tools:listitem="@layout/abc" >
    </ListView>

    <com.google.android.gms.ads.AdView
        android:id="@+id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        ads:adSize="BANNER"
        ads:adUnitId="<this_is_my_personal_id>" >
    </com.google.android.gms.ads.AdView>

</RelativeLayout>

Code:

// Look up the AdView as a resource and load a request.
AdRequest adRequest = new AdRequest.Builder().build();
adView = (AdView) findViewById(R.id.adView);
adView.loadAd(adRequest);

Please help.

-----------Update---------------

Manifest:

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
         <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />


 <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

....
....
....
Community
  • 1
  • 1
Hisham Muneer
  • 8,558
  • 10
  • 54
  • 79
  • 1
    have you added the google-play-services library project? – peshkira Apr 12 '14 at 15:46
  • yes, i have it as a reference project. These are what i followed: http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject and http://developer.android.com/google/play-services/setup.html – Hisham Muneer Apr 12 '14 at 15:48
  • can you please post your android manifest or at least the relevant portions for the Ads SDK – peshkira Apr 12 '14 at 15:50
  • please check the updated part. – Hisham Muneer Apr 12 '14 at 15:54
  • How are you building the project? IDE (Eclipse, IntelliJ, Android Studio) or CL (ant, maven)? It looks like your dependant project *jus* is exporting the class (via the jar) to your project and not the XML resources as an apk lib. – Andrew Mackenzie Apr 12 '14 at 15:55
  • If you are using Eclipse make sure "Android Private Libraries" and "Android Dependencies" are checked in Project Properties/Java Build Path/Order and Export – Ken Wolf Apr 12 '14 at 15:56
  • I know it sounds trivial, but maybe also clean your project? also make sure you have done all the steps in this guide: https://developers.google.com/mobile-ads-sdk/docs/#play (maybe you skipped something) – peshkira Apr 12 '14 at 15:57
  • I am using eclipse and they are checked. I triple checked everything. – Hisham Muneer Apr 12 '14 at 15:57
  • Tried the clean your project, fix dependencies etc... – Hisham Muneer Apr 12 '14 at 15:58
  • @ZohraKhan Thanks for replying, but I am not able to run the application on my device and emulator. It gets crashed or don't install at all. – Hisham Muneer Apr 14 '14 at 05:36
  • since revision 13, Google Play services required you to include a in your manifest pointing to a resource in the Google Play services library. So if you were referencing the library incorrectly, either your project wouldn't compile or your app would crash as soon as you tried to use play services.Check this https://groups.google.com/forum/#!topic/google-admob-ads-sdk/XoxVnnZchr0 – Zohra Khan Apr 14 '14 at 06:11
  • @ZohraKhan please look at the manifest file code. Is this meta tag you are talking about? if yes, i have it already in my code. – Hisham Muneer Apr 14 '14 at 06:21
  • Did you find out the asnwer @Hisham Muneer – Snake May 20 '14 at 04:41

0 Answers0