Android数据已发送但未出现在Rollbar上

时间:2019-01-18 12:30:04

标签: android kotlin rollbar

我们有一个Kotlin Android应用程序,我们想集成rollbar,但是到目前为止,它还没有成功,我们的gradle创投平台:

android {
    compileSdkVersion 26
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.basecamp:turbolinks:1.0.8'
    implementation 'com.rollbar:rollbar-java:1.4.0'
}

主要活动中的行:

import com.rollbar.notifier.Rollbar
import com.rollbar.notifier.config.ConfigBuilder

class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListener {
    lateinit private var turbolinksHelper: TurbolinksHelper

    val config = ConfigBuilder.withAccessToken("f9178dca7b5d450b986b36ddc8b2159a")
        .language("scala")
        .codeVersion("1.0.0")
        .environment("production")
        .enabled(true)
        .build()
    val rollbar = Rollbar.init(config)

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        rollbar.info("This is a test message")
        rollbar.log(Error("this is an error"), "another thing to exist")

使用Charles,我可以看到该应用程序正在与Rollbar Service进行通信,但是项目仪表板上没有任何显示

预先感谢

1 个答案:

答案 0 :(得分:0)

This is the same issue as https://github.com/rollbar/rollbar-java/issues/172. The maintainers of rollbar-java are troubleshooting via that Github issue.