Chad Precilla
Chad Precilla

Reputation: 57

How to initialize instabug for android?

I have added compile com.instabug.library:instabugsupport:1+ to dependency in build grade and synced with gradle files, added

Instabug.initialize(this, "your_app_token_here");

after setcontentview in my MainActivity.

However this is being underlined as an error.
What am I not doing or doing wrong?

Upvotes: 2

Views: 798

Answers (1)

Hassan Ibraheem
Hassan Ibraheem

Reputation: 2379

The initialize() method expects an Application object as a first parameter.

You can use this.getApplication() instead, if this is your first Activity, or just create a custom Application class and initialize the SDK in its onCreate()

Upvotes: 3

Related Questions