InstaBug,无法解决'Builder'


第一次

尝试实现InstaBug,但是,当我初始化它时,

 new Instabug.Builder(this, "XXXXXXXXXXXXXXXXXXXX")
            .setInvocationEvent(Instabug.IBGInvocationEvent.IBGInvocationEventShake)
            .build();

Android Studio表示无法解析符号Builder 虽然生成器从java.lang.Object扩展而来,但无奈地弄清楚为什么会发生这种情况。有什么解决办法吗?

编辑:

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.code.gson:gson:2.5'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile "com.google.android.gms:play-services:8.4.0"
compile 'com.android.support:cardview-v7:+'
compile 'com.android.support:design:+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.commit451:PhotoView:1.2.4'
compile 'net.danlew:android.joda:2.9.1'
compile project(":volley")
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile ("com.instabug.library:instabugsupport:+") { exclude group: 'com.mcxiaoke.volley', module: 'library' }

Instabug.Builder是在Instabug SDK的v2+中引入的。

您可以尝试在 gradle 中指定最新版本的 Instabug 吗,如下所示:

compile('com.instabug.library:instabugcompat:2.2.1')

PS:v2.2.1在撰写本文时是最新的

P.S2:instabugcompat相当于 v2+ 中的instabugsupport

P.S3:Instabug不再包含Volley,所以你不需要再排除它

有关更多详细信息,请随时询问。你可以看看这个以及提到的@m-d

最新更新