-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
Please i'm expecting quick solution for this.
I used thermal_printer: ^1.0.5
version.
and my flutter version is Flutter 3.22.1
and this is my android build.gradle
file
buildscript {
ext.kotlin_version = '1.9.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.15'
// id("com.google.gms.google-services") version "4.3.15" apply false
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
This is the Error log in my console.
E/MethodChannel#com.codingdevs.thermal_printer(21824): Failed to handle method call
E/MethodChannel#com.codingdevs.thermal_printer(21824): java.lang.NullPointerException
E/MethodChannel#com.codingdevs.thermal_printer(21824): at com.codingdevs.thermal_printer.ThermalPrinterPlugin.checkPermissions(ThermalPrinterPlugin.kt:384)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at com.codingdevs.thermal_printer.ThermalPrinterPlugin.verifyIsBluetoothIsOn(ThermalPrinterPlugin.kt:306)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at com.codingdevs.thermal_printer.ThermalPrinterPlugin.onMethodCall(ThermalPrinterPlugin.kt:212)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at android.os.Handler.handleCallback(Handler.java:958)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at android.os.Looper.loopOnce(Looper.java:230)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at android.os.Looper.loop(Looper.java:319)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at android.app.ActivityThread.main(ActivityThread.java:8919)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
E/MethodChannel#com.codingdevs.thermal_printer(21824): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
E/flutter (21824): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, null, null, java.lang.NullPointerException
E/flutter (21824): at com.codingdevs.thermal_printer.ThermalPrinterPlugin.checkPermissions(ThermalPrinterPlugin.kt:384)
E/flutter (21824): at com.codingdevs.thermal_printer.ThermalPrinterPlugin.verifyIsBluetoothIsOn(ThermalPrinterPlugin.kt:306)
E/flutter (21824): at com.codingdevs.thermal_printer.ThermalPrinterPlugin.onMethodCall(ThermalPrinterPlugin.kt:212)
E/flutter (21824): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/flutter (21824): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/flutter (21824): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/flutter (21824): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/flutter (21824): at android.os.Handler.handleCallback(Handler.java:958)
E/flutter (21824): at android.os.Handler.dispatchMessage(Handler.java:99)
E/flutter (21824): at android.os.Looper.loopOnce(Looper.java:230)
E/flutter (21824): at android.os.Looper.loop(Looper.java:319)
E/flutter (21824): at android.app.ActivityThread.main(ActivityThread.java:8919)
E/flutter (21824): at java.lang.reflect.Method.invoke(Native Method)
E/flutter (21824): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
E/flutter (21824): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
E/flutter (21824): )
E/flutter (21824): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648:7)
E/flutter (21824): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)
E/flutter (21824): <asynchronous suspension>
E/flutter (21824):
Thank You!
Metadata
Metadata
Assignees
Labels
No labels