firebase_messaging 1.0.3 plugin and map_view plugin crash my app

226 views
Skip to first unread message

Niyazi Toros

unread,
Jun 22, 2018, 5:17:01 PM6/22/18
to Flutter Dev

Hi,


I follow the map_view plugin example and I add to my application and it was working perfect.

Then I decide add firebase_messaging 1.0.3 plugin to my app. When I try to run on my Samsung mobile the app while is building crashed. I try different potion and last 3 days every time I run is crashed.


As you can see below I put AndroidManifest.xml, app->build.gradle, project->build.gradle, iOS->Info.plist files as well as the error list.


Any Help Please?


This is my AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"

    package="com.niyazibank.niyazibank">


    <!-- The INTERNET permission is required for development. Specifically,

         flutter needs it to communicate with the running application

         to allow setting breakpoints, to provide hot reload, etc.

    -->

    <uses-permission android:name="android.permission.INTERNET"/>

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>


    <!-- io.flutter.app.FlutterApplication is an android.app.Application that

         calls FlutterMain.startInitialization(this); in its onCreate method.

         In most cases you can leave this as-is, but you if you want to provide

         additional functionality it is fine to subclass or reimplement

         FlutterApplication and put your custom class here. -->

    <application

        android:name="io.flutter.app.FlutterApplication"

        android:label="niyazibank"

        android:icon="@mipmap/ic_launcher">

        <activity

            android:name=".MainActivity"

            android:launchMode="singleTop"

            android:theme="@style/LaunchTheme"

            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"

            android:hardwareAccelerated="true"

            android:windowSoftInputMode="adjustResize">

            <!-- This keeps the window background of the activity showing

                 until Flutter renders its first frame. It can be removed if

                 there is no splash screen (such as the default splash screen

                 defined in @style/LaunchTheme). -->

            <meta-data

                android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"

                android:value="true" />

            <intent-filter>

                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>

                <action android:name="FLUTTER_NOTIFICATION_CLICK" />

                <category android:name="android.intent.category.DEFAULT" />

            </intent-filter>

        </activity>

        <activity android:name="com.apptreesoftware.mapview.MapActivity" android:theme="@style/Theme.AppCompat.Light.DarkActionBar"/>

        <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyDTaxyUey-PajtKJD7QmsFtVCxVIDynIj0"/>

        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>

    </application>

</manifest>




This is my app->build.gradle

def localProperties = new Properties()

def localPropertiesFile = rootProject.file('local.properties')

if (localPropertiesFile.exists()) {

    localPropertiesFile.withReader('UTF-8') { reader ->

        localProperties.load(reader)

    }

    localPropertiesFile.withInputStream { stream ->

        localProperties.load(stream)

    }

}


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.")

}


apply plugin: 'com.android.application'

apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"


android {

    compileSdkVersion 27


    lintOptions {

        disable 'InvalidPackage'

    }


    defaultConfig {

        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).

        applicationId "com.niyazibank.niyazibank"

        minSdkVersion 16

        targetSdkVersion 27

        versionCode 1

        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }


    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 {

    testImplementation 'junit:junit:4.12'

    androidTestImplementation 'com.android.support.test:runner:1.0.1'

    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

}




This is my project->build.gradle

buildscript {

    repositories {

        google()

        jcenter()

    }


    dependencies {

        classpath 'com.android.tools.build:gradle:3.0.1'

        //classpath 'com.android.tools.build:gradle:3.1.2'

        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.2-4'

    }

}


allprojects {

    repositories {

        google()

        jcenter()

    }

}


rootProject.buildDir = '../build'

subprojects {

    project.buildDir = "${rootProject.buildDir}/${project.name}"

    project.evaluationDependsOn(':app')

}


task clean(type: Delete) {

    delete rootProject.buildDir

}





This is my iOS->Info.plist

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

   <key>CFBundleDevelopmentRegion</key>

   <string>en</string>

   <key>CFBundleExecutable</key>

   <string>$(EXECUTABLE_NAME)</string>

   <key>CFBundleIdentifier</key>

   <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>

   <key>CFBundleInfoDictionaryVersion</key>

   <string>6.0</string>

   <key>CFBundleName</key>

   <string>niyazibank</string>

   <key>CFBundlePackageType</key>

   <string>APPL</string>

   <key>CFBundleShortVersionString</key>

   <string>1.0</string>

   <key>CFBundleSignature</key>

   <string>????</string>

   <key>CFBundleVersion</key>

   <string>1</string>

   <key>LSRequiresIPhoneOS</key>

   <true/>

    <key>NSLocationWhenInUseUsageDescription</key>

   <string>Using location to display on a map</string>


   <key>UILaunchStoryboardName</key>

   <string>LaunchScreen</string>

   <key>UIMainStoryboardFile</key>

   <string>Main</string>

   <key>NSLocationWhenInUseUsageDescription</key>

        <string>Using location to display on a map</string>

   <key>UIRequiredDeviceCapabilities</key>

   <array>

      <string>arm64</string>

   </array>

   <key>UISupportedInterfaceOrientations</key>

   <array>

      <string>UIInterfaceOrientationPortrait</string>

      <string>UIInterfaceOrientationLandscapeLeft</string>

      <string>UIInterfaceOrientationLandscapeRight</string>

   </array>

   <key>UISupportedInterfaceOrientations~ipad</key>

   <array>

      <string>UIInterfaceOrientationPortrait</string>

      <string>UIInterfaceOrientationPortraitUpsideDown</string>

      <string>UIInterfaceOrientationLandscapeLeft</string>

      <string>UIInterfaceOrientationLandscapeRight</string>

   </array>

   <key>UIViewControllerBasedStatusBarAppearance</key>

   <false/>

</dict>

</plist>






This is the ERROR I am getting.

Running "flutter packages get" in niyazibank...

Launching lib/main.dart on SM G935F in debug mode...

Initializing gradle...

Resolving dependencies...

Running 'gradlew assembleDebug'...

Configuration 'compile' in project ':map_view' is deprecated. Use 'implementation' instead.

Built build/app/outputs/apk/debug/app-debug.apk.

Installing build/app/outputs/apk/app.apk...

Syncing files to device SM G935F...

D/libGLESv2( 1077): STS_GLApi : DTS, ODTC are not allowed for Package : com.yourcompany.niyazibank

I/zygote64( 1077): Do partial code cache collection, code=59KB, data=40KB

I/zygote64( 1077): After code cache collection, code=59KB, data=40KB

I/zygote64( 1077): Increasing code cache capacity to 256KB

D/ViewRootImpl@1189537[MainActivity]( 1077): ViewPostIme pointer 0

D/ViewRootImpl@1189537[MainActivity]( 1077): ViewPostIme pointer 1

D/ViewRootImpl@1189537[MainActivity]( 1077): ViewPostIme pointer 0

D/ViewRootImpl@1189537[MainActivity]( 1077): ViewPostIme pointer 1

D/ViewRootImpl@1189537[MainActivity]( 1077): ViewPostIme pointer 0

D/ViewRootImpl@1189537[MainActivity]( 1077): ViewPostIme pointer 1

I/zygote64( 1077): Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.maps.model.CameraPosition>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzbfm;

I/zygote64( 1077):   at void com.apptreesoftware.mapview.MapViewPlugin.<clinit>() (MapViewPlugin.kt:-1)

I/zygote64( 1077):   at void com.apptreesoftware.mapview.MapViewPlugin.registerWith(io.flutter.plugin.common.PluginRegistry$Registrar) (MapViewPlugin.kt:-1)

I/zygote64( 1077):   at void io.flutter.plugins.GeneratedPluginRegistrant.registerWith(io.flutter.plugin.common.PluginRegistry) (GeneratedPluginRegistrant.java:19)

I/zygote64( 1077):   at void com.yourcompany.niyazibank.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:12)

I/zygote64( 1077):   at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7174)

I/zygote64( 1077):   at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1220)

I/zygote64( 1077):   at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2910)

I/zygote64( 1077):   at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3032)

I/zygote64( 1077):   at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)

I/zygote64( 1077):   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1696)

I/zygote64( 1077):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:105)

I/zygote64( 1077):   at void android.os.Looper.loop() (Looper.java:164)

I/zygote64( 1077):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6944)

I/zygote64( 1077):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)

I/zygote64( 1077):   at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:327)

I/zygote64( 1077):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1374)

I/zygote64( 1077): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.internal.zzbfm" on path: DexPathList[[zip file "/data/app/com.yourcompany.niyazibank-qSmtdcxZ2dvcK8UvjKBMCA==/base.apk"],nativeLibraryDirectories=[/data/app/com.yourcompany.niyazibank-qSmtdcxZ2dvcK8UvjKBMCA==/lib/arm64, /data/app/com.yourcompany.niyazibank-qSmtdcxZ2dvcK8UvjKBMCA==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]

I/zygote64( 1077):   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:93)

I/zygote64( 1077):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)

I/zygote64( 1077):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)

I/zygote64( 1077):   at void com.apptreesoftware.mapview.MapViewPlugin.<clinit>() (MapViewPlugin.kt:-1)

I/zygote64( 1077):   at void com.apptreesoftware.mapview.MapViewPlugin.registerWith(io.flutter.plugin.common.PluginRegistry$Registrar) (MapViewPlugin.kt:-1)

I/zygote64( 1077):   at void io.flutter.plugins.GeneratedPluginRegistrant.registerWith(io.flutter.plugin.common.PluginRegistry) (GeneratedPluginRegistrant.java:19)

I/zygote64( 1077):   at void com.yourcompany.niyazibank.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:12)

I/zygote64( 1077):   at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7174)

I/zygote64( 1077):   at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1220)

I/zygote64( 1077):   at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2910)

I/zygote64( 1077):   at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3032)

I/zygote64( 1077):   at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)

I/zygote64( 1077):   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1696)

I/zygote64( 1077):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:105)

I/zygote64( 1077):   at void android.os.Looper.loop() (Looper.java:164)

I/zygote64( 1077):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6944)

I/zygote64( 1077):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)

I/zygote64( 1077):   at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:327)

I/zygote64( 1077):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1374)

I/zygote64( 1077): 

F/flutter ( 1077): [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(61)] Check failed: CheckException(env). 

F/libc    ( 1077): Fatal signal 6 (SIGABRT), code -6 in tid 1077 (any.niyazibank)

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

Build fingerprint: 'samsung/hero2ltexx/hero2lte:8.0.0/R16NW/G935FXXU2EREM:user/release-keys'

Revision: '9'

ABI: 'arm64'

pid: 1077, tid: 1077, name: any.niyazibank  >>> com.yourcompany.niyazibank <<<

signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------

Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(61)] Check failed: CheckException(env). 

'

    x0   0000000000000000  x1   0000000000000435  x2   0000000000000006  x3   0000000000000008

    x4   0000000000000000  x5   0000000000000000  x6   0000000000000000  x7   7f7f7f7f7f7f7f7f

    x8   0000000000000083  x9   a68234d376d6304f  x10  0000000000000000  x11  0000000000000001

    x12  ffffffffffffffff  x13  ffffffffffffffff  x14  ff00000000000000  x15  ffffffffffffffff

    x16  000000716fe1a2f8  x17  000000716fdbb34c  x18  0000000012d21498  x19  0000000000000435

    x20  0000000000000435  x21  0000007fe9689dd8  x22  00000071440daec0  x23  00000071440daec8

    x24  000000715b855110  x25  000000714c3f0000  x26  000000715b855110  x27  000000714c3f0050

    x28  000018c65133a453  x29  0000007fe9689db0  x30  000000716fd6dbd4

    sp   0000007fe9689d70  pc   000000716fdbb354  pstate 0000000060000000

backtrace:

    #00 pc 000000000006b354  /system/lib64/libc.so (tgkill+8)

    #01 pc 000000000001dbd0  /system/lib64/libc.so (abort+88)

    #02 pc 00000000003b057c  /data/app/com.yourcompany.niyazibank-qSmtdcxZ2dvcK8UvjKBMCA==/lib/arm64/libflutter.so

    #03 pc 00000000003b0cc4  /data/app/com.yourcompany.niyazibank-qSmtdcxZ2dvcK8UvjKBMCA==/lib/arm64/libflutter.so

    #04 pc 000000000015d0c8  /data/app/com.yourcompany.niyazibank-qSmtdcxZ2dvcK8UvjKBMCA==/lib/arm64/libflutter.so

    #05 pc 000000000015b7f8  /data/app/com.yourcompany.niyazibank-qSmtdcxZ2dvcK8UvjKBMCA==/lib/arm64/libflutter.so

    #06 pc 00000000001a7a48  /data/app/com.yourcompany.niyazibank-qSmtdcxZ2dvcK8UvjKBMCA==/lib/arm64/libflutter.so

    #07 pc 000000000016bcc8  /data/app/com.yourcompany.niyazibank-qSmtdcxZ2dvcK8UvjKBMCA==/lib/arm64/libflutter.so

    #08 pc 00000000001701e4  /data/app/com.yourcompany.niyazibank-qSmtdcxZ2dvcK8UvjKBMCA==/lib/arm64/libflutter.so

    #09 pc 0000000000015eb4  /system/lib64/libutils.so (_ZN7android6Looper9pollInnerEi+808)

    #10 pc 0000000000015b04  /system/lib64/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+108)

    #11 pc 000000000015afe8  /system/lib64/libandroid_runtime.so (_ZN7androidL38android_os_MessageQueue_nativePollOnceEP7_JNIEnvP8_jobjectli+44)

    #12 pc 000000000087d1ec  /system/framework/arm64/boot-framework.oat (offset 0x690000) (android.app.NativeActivity.onWindowFocusChangedNative [DEDUPED]+140)

    #13 pc 00000000000103e8  /dev/ashmem/dalvik-jit-code-cache_1077_1077 (deleted)

Lost connection to device.

Niyazi Toros

unread,
Jun 24, 2018, 12:53:20 AM6/24/18
to Flutter Dev
Any help please?

Ілля Романенко

unread,
Jun 24, 2018, 4:30:45 AM6/24/18
to Niyazi Toros, Flutter Dev
Try to put a minimal app(only those parts that lead to the crash) to github so everyone can take a look.

нд, 24 черв. 2018 р., 07:53 користувач Niyazi Toros <niyazi...@gmail.com> пише:
Any help please?

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Niyazi Toros

unread,
Jun 24, 2018, 5:11:20 AM6/24/18
to Flutter Dev
Thanks Illia, It is the minimal. I created basic project and I add the map_view plugin (map_view: "^0.0.12"). Its work perfectly. Then I add  even using it the firebase_messaging: "^1.0.3" and run packages get. Built the app its okay. But once I open app and tap the map it crash the app.

Ілля Романенко

unread,
Jun 24, 2018, 6:09:11 AM6/24/18
to niyazi...@gmail.com, flutt...@googlegroups.com
Can you push it to GitHub and post link to repository here?

нд, 24 черв. 2018 о 12:11 Niyazi Toros <niyazi...@gmail.com> пише:
Thanks Illia, It is the minimal. I created basic project and I add the map_view plugin (map_view: "^0.0.12"). Its work perfectly. Then I add  even using it the firebase_messaging: "^1.0.3" and run packages get. Built the app its okay. But once I open app and tap the map it crash the app.

--

Niyazi Toros

unread,
Jun 24, 2018, 8:03:09 AM6/24/18
to Flutter Dev
Reply all
Reply to author
Forward
0 new messages