Skip to content

Multiple main() functions being called #80

@ConnorDykes

Description

@ConnorDykes

When I follow the docs and add the Application.kt then add the tag android:name=".Application" to application to my manifest it its causing my app to spawn two main functions which crashed my app. am I doing something wrong?

 <application
        android:label="SIX"
         android:name=".Application"
        android:allowBackup="false"
        tools:replace="android:allowBackup"
        android:icon="@mipmap/ic_six_2_launcher"
        android:alwaysRetainTaskState="true"
        android:enableOnBackInvokedCallback="false"
        >
import io.flutter.app.FlutterApplication
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.PluginRegistry
import io.flutter.plugins.GeneratedPluginRegistrant

import io.radar.sdk.Radar

class Application : FlutterApplication(), PluginRegistry.PluginRegistrantCallback {

  override fun onCreate() {
      super.onCreate()
      Radar.initialize(this, "prj_test_pk_...")
  }

  override fun registerWith(registry: PluginRegistry) {
      GeneratedPluginRegistrant.registerWith(FlutterEngine(this))
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions