0

I am integrating Inmobi SDK for ads in my android application. I have setup my inmobi account and have the application id from there. Below is the XML is use to setup the ad

<com.inmobi.monetization.IMBanner
            android:layout_width="320dp"
            android:layout_height="50dp"
            android:id="@+id/banner"
            adSize="15"
            appId="xxxxxxxxxx"
            />

And of course i have replaced the XXXXX with my application id from the property in my Inmobi account. The first problem i observed was that appId is not being identified as a valid attribute. Secondly if i try and do a findViewById in my activity I always get a null reference back.

What am i missing in the implementation here?

Anuj
  • 389
  • 1
  • 5
  • 20

1 Answers1

0

This was a very silly mistake. In Android Studio there were multiple layout files for the same activity and I was adding the AdView only to one of them.

Anuj
  • 389
  • 1
  • 5
  • 20