1

while integrating the inmobi sdk i got the following error:

com.inmobi.monetization.IMBanner failed to instantiate.

My Java code is:

    protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_activity);
    setTitle(R.string.mainscreen);

    InMobi.initialize(this, "abcd");

    IMBanner banner = (IMBanner) findViewById(R.id.banner);
    banner.loadBanner(); }

and my xml code is

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

Please help me to sort out this problem.I am new to android.

Shagun
  • 33
  • 2
  • 6
  • Sohan from InMobi here. Did you register your app on your InMobi account? Once you register your app, you will see your app ID which you have to replace in the code that you have pasted above. – Sohan Jul 18 '14 at 04:58
  • sir i have not yet published my app.I am trying for test mode but even in test mode i dont see any banner.what app id should i use while in test mode. – Shagun Jul 23 '14 at 18:46
  • 1
    Do this. Create a property with any random app (Angry Birds for example). It won't be verified but you will be able to see test ads. Make sure you put test mode on for that app and use that app ID. Once you have your app up on the app store, add it as property and then replace the old app ID with the new one. Hope this helps :) – Sohan Jul 24 '14 at 13:56
  • thanks :) .I now face another problem.I login to my account through my google id but now when i press 'login with google id' button.It shows unknown exception error.plz help – Shagun Jul 27 '14 at 18:59
  • Hm. I'm not sure why thats happening. Tested it out now and it seems to be working fine. Can you try creating a new account? – Sohan Jul 28 '14 at 06:15
  • It was showing thsi message yesterday.But now its working fine.I wonder why It was showing this message – Shagun Jul 29 '14 at 17:45

0 Answers0