Closed billysmt closed 3 years ago
This is not a crash. The plugin is catching this exception and rendering the stacktrace you see here. However, there seems to be a problem in your android config.
Show me the following files:
android/app/build.gradle
<manifest>
element from your AndroidManifest
, eg:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.transistorsoft.flutterbackgroundgeolocationexample">
There it is.
in build.gradle
:
applicationId "com.engage"
But in AndroidManifest
package="com.engagemobilize.engageapp"
They're supposed to be the same.
Btw, you don't want to be releasing with debuggable true
. That would be a big security hole in your app.
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
debuggable true
Your Environment
flutter doctor
): (Channel stable, 1.22.2, on Linux, locale en_US.UTF-8)Plugin config:
Expected Behavior
Startup without Errors filling the logs
Actual Behavior
Starts up, appears to work but there's lots of errors in the logs related to com.engage.BuildConfig not being present. I don't remember seeing that beforehand.
Steps to Reproduce
Context
General Geo Fence and breadcrumb tracking.
Debug logs
Logs
``` Waiting for Pixel 3 XL to report its views... I/TSLocationManager( 8739): [c.t.l.BootReceiver$a run] I/TSLocationManager( 8739): ╔═════════════════════════════════════════════ I/TSLocationManager( 8739): ║ BootReceiver: com.engage I/TSLocationManager( 8739): ╠═════════════════════════════════════════════ I/TSLocationManager( 8739): ╟─ android.intent.action.MY_PACKAGE_REPLACED D/TSBackgroundFetch( 8739): BootReceiver: android.intent.action.MY_PACKAGE_REPLACED D/TSLocationManager( 8739): [c.t.l.g.TSGeofenceManager c] ℹ️ Persist monitored geofences: [] E/TSLocationManager( 8739): [c.t.locationmanager.util.a d] E/TSLocationManager( 8739): ‼️ Failed to deduce Application's BuildConfig class for package name:com.engage or com W/System.err( 8739): java.lang.ClassNotFoundException: com.engage.BuildConfig W/System.err( 8739): at java.lang.Class.classForName(Native Method) W/System.err( 8739): at java.lang.Class.forName(Class.java:454) W/System.err( 8739): at java.lang.Class.forName(Class.java:379) W/System.err( 8739): at com.transistorsoft.locationmanager.util.a.d(Unknown Source:37) W/System.err( 8739): at com.transistorsoft.locationmanager.util.a.a(Unknown Source:11) W/System.err( 8739): at com.transistorsoft.locationmanager.util.a.b(Unknown Source:0) W/System.err( 8739): at com.transistorsoft.locationmanager.adapter.BackgroundGeolocation.isMainActivityActive(Unknown Source:103) W/System.err( 8739): at com.transistorsoft.locationmanager.BootReceiver.a(Unknown Source:24) W/System.err( 8739): at com.transistorsoft.locationmanager.BootReceiver.a(Unknown Source:0) W/System.err( 8739): at com.transistorsoft.locationmanager.BootReceiver$a.run(Unknown Source:117) W/System.err( 8739): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) W/System.err( 8739): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) W/System.err( 8739): at java.lang.Thread.run(Thread.java:923) W/System.err( 8739): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.engage.BuildConfig" on path: DexPathList[[zip file "/data/app/~~oVGAcPPM-R_Ecr3DIPrMnA==/com.engage-JXaudjbMEIVTvG4pNdLrNQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~oVGAcPPM-R_Ecr3DIPrMnA==/com.engage-JXaudjbMEIVTvG4pNdLrNQ==/lib/arm64, /data/app/~~oVGAcPPM-R_Ecr3DIPrMnA==/com.engage-JXaudjbMEIVTvG4pNdLrNQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64, /product/lib64]] W/System.err( 8739): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207) W/System.err( 8739): at java.lang.ClassLoader.loadClass(ClassLoader.java:379) W/System.err( 8739): at java.lang.ClassLoader.loadClass(ClassLoader.java:312) W/System.err( 8739): ... 13 more D/TSLocationManager( 8739): [c.t.l.a.BackgroundGeolocation isMainActivityActive] NO W/TSLocationManager( 8739): [c.t.l.BootReceiver a] W/TSLocationManager( 8739): ⚠️ Plugin is configured to stopOnTerminate: true. Refusing to start BackgroundGeolocation on boot ```