Android 如果我留下这个错误,可能会有什么问题?java.lang.IllegalArgumentException:未注册服务:lu@5d88aef

Android 如果我留下这个错误,可能会有什么问题?java.lang.IllegalArgumentException:未注册服务:lu@5d88aef,android,flutter,Android,Flutter,我正在尝试制作一个带有FCM和本地通知的Flutter应用程序,完全不考虑本地android/kotlin开发。我在应用程序上设置firebase\u消息时遇到问题,该问题已由Kotlin修复,并在我的flift应用程序中使用(无论如何都使用Kotlin) 该应用程序工作正常,性能良好,没有问题。但我在控制台上抛出了一个新的异常,声明如下: W/ConnectionTracker(19481): Exception thrown while unbinding W/ConnectionTrack

我正在尝试制作一个带有FCM和本地通知的Flutter应用程序,完全不考虑本地android/kotlin开发。我在应用程序上设置
firebase\u消息时遇到问题,该问题已由Kotlin修复,并在我的flift应用程序中使用(无论如何都使用Kotlin)

该应用程序工作正常,性能良好,没有问题。但我在控制台上抛出了一个新的异常,声明如下:

W/ConnectionTracker(19481): Exception thrown while unbinding
W/ConnectionTracker(19481): java.lang.IllegalArgumentException: Service not registered: lu@5d88aef
W/ConnectionTracker(19481):     at android.app.LoadedApk.forgetServiceDispatcher(Unknown Source:195)
W/ConnectionTracker(19481):     at android.app.ContextImpl.unbindService(Unknown Source:11)
W/ConnectionTracker(19481):     at android.content.ContextWrapper.unbindService(Unknown Source:2)
W/ConnectionTracker(19481):     at ci.f(:com.google.android.gms.dynamite_measurementdynamite@204516081@20.45.16 (120400-0):1)
W/ConnectionTracker(19481):     at ci.d(:com.google.android.gms.dynamite_measurementdynamite@204516081@20.45.16 (120400-0):2)
W/ConnectionTracker(19481):     at lv.E(:com.google.android.gms.dynamite_measurementdynamite@204516081@20.45.16 (120400-0):9)
W/ConnectionTracker(19481):     at lf.a(:com.google.android.gms.dynamite_measurementdynamite@204516081@20.45.16 (120400-0):3)
W/ConnectionTracker(19481):     at ef.run(:com.google.android.gms.dynamite_measurementdynamite@204516081@20.45.16 (120400-0):3)
W/ConnectionTracker(19481):     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
W/ConnectionTracker(19481):     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
W/ConnectionTracker(19481):     at iy.run(:com.google.android.gms.dynamite_measurementdynamite@204516081@20.45.16 (120400-0):5)
但是,该应用程序不会崩溃或冻结。我想预测最糟糕的schenario并尝试修复它,但我不知道如何修复,因为Flatter使用Dart,并且
src
目录中只有2个Kotlin文件
Application.kt
是我为修复程序创建的,以及框架创建的
MainActivity.kt

如果我忽略了这个例外,继续前进,可能会有什么问题?这会成为一个大问题吗?如果是的话。。我怎样才能修好它

另外,请看一下我之前提到的2 Kotlin文件和我的app/gradle文件。我真的需要你的帮助。提前谢谢

Application.kt

package com.example.todoops
导入io.flatter.app.flatterApplication
导入io.flatter.plugin.common.PluginRegistry
导入io.flatter.plugin.common.PluginRegistry.PluginRegistrantCallback
导入io.flatter.plugins.GeneratedPluginRegistrant
导入io.flatter.plugins.firebasemessaging.FlatterFireBaseMessagingService
导入io.flatter.plugins.firebasemessaging.FirebaseMessagingPlugin
类应用程序:flatterApplication(),PluginRegistrantCallback{
重写fun onCreate(){
super.onCreate()
FlatterFireBaseMessAgingService.setPluginRegistrNet(此)
}
使用(pluginRegistry:pluginRegistry)覆盖乐趣注册表{
FirebaseMessagingPlugin.registerWith(pluginRegistry.registerFor(“io.flatter.plugins.FirebaseMessagingPlugin.FirebaseMessagingPlugin”))
}
}
MainActivity.kt

package com.example.todoops
导入io.flatter.embedding.android.flatterActivity
类MainActivity:activity(){
}
src/app/build.gradle

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    compileSdkVersion 29

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    lintOptions {
        disable 'InvalidPackage'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.todoops"
        minSdkVersion 16
        targetSdkVersion 29
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
        }
    }
}

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.google.android.gms:play-services-basement:17.5.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.google.firebase:firebase-messaging:21.0.0'
}

apply plugin: 'com.google.gms.google-services'


不确定,但请尝试以下步骤

添加到build.gradle(../android/app/build.gradle)

建议先试一下

implementation 'com.google.firebase:firebase-analytics:18.0.0'

在谷歌上搜索了几个小时后,我发现他们的回购协议上说这不是一个致命的错误。看到异常在随机时间弹出是很烦人的,但幸运的是它可以被IDE折叠/排除


所以。。除了继续前进,等待他们修复(希望如此)。

如果有人在这方面遇到困难,你必须根据启动应用程序时的最新方法重做你的应用程序 谷歌几乎改造了整个管道系统

特别注意v2嵌入上的kotlin更新。。。几乎删除了大部分我的kotlin MainActivity和其他文件


您确定添加了“google service.json”文件吗?是的,它与gradle fileHi@iPatel位于同一个目录中,谢谢您的回答,我已经尝试过了,不幸的是仍然有错误。。
implementation 'com.google.firebase:firebase-analytics:18.0.0'