Visitar URL original
NoSuchMethodError FirebaseCrashlyticsNdk class is included in your app. · Issue #1177 · firebase/quickstart-unity · GitHub
Skip to content

NoSuchMethodError FirebaseCrashlyticsNdk class is included in your app. #1177

Description

@keepup

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2019.4.24
  • Firebase Unity SDK version: 8.6.0
  • Source you installed the SDK: .unitypackage (.unitypackage or Unity Package Manager)
  • Problematic Firebase Component: FirebaseCrashlytics (Auth, Database, etc.)
  • Other Firebase Components in use: Cloud Messaging / Google Analytics (Auth, Database, etc.)
  • Additional SDKs you are using: Facebook/AdMob/Ironsource (Facebook, AdMob, etc.)
  • Platform you are using the Unity editor on: Mac (Mac, Windows, or Linux)
  • Platform you are targeting: Android (iOS, Android, and/or desktop)
  • Scripting Runtime: IL2CPP (Mono, and/or IL2CPP)

[REQUIRED] Please describe the question here:

This is logs:

2021/11/09 19:05:53.565 28667 28744 Warn System.err java.lang.NoSuchMethodError: no static method "Lcom/google/firebase/crashlytics/ndk/FirebaseCrashlyticsNdk;.getInstance()Lcom/google/firebase/crashlytics/ndk/FirebaseCrashlyticsNdk;"
2021/11/09 19:05:53.565 28667 28744 Warn System.err 	at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
2021/11/09 19:05:53.565 28667 28744 Warn System.err 	at com.unity3d.player.UnityPlayer.access$600(Unknown Source:0)
2021/11/09 19:05:53.565 28667 28744 Warn System.err 	at com.unity3d.player.UnityPlayer$f$1.handleMessage(Unknown Source:150)
2021/11/09 19:05:53.565 28667 28744 Warn System.err 	at android.os.Handler.dispatchMessage(Handler.java:102)
2021/11/09 19:05:53.565 28667 28744 Warn System.err 	at android.os.Looper.loop(Looper.java:236)
2021/11/09 19:05:53.565 28667 28744 Warn System.err 	at com.unity3d.player.UnityPlayer$f.run(Unknown Source:20)
2021/11/09 19:05:53.565 28667 28744 Error firebase method_ids[i] || (method.optional == kMethodOptional)
2021/11/09 19:05:53.566 28667 28744 Error Unity method_ids[i] || (method.optional == kMethodOptional)
2021/11/09 19:05:53.566 28667 28744 Error Unity Firebase.Crashlytics.CrashlyticsInternalPINVOKE:FirebaseCrashlyticsInternal_GetInstance__SWIG_0(HandleRef, Int32&)
2021/11/09 19:05:53.566 28667 28744 Error Unity Firebase.Crashlytics.FirebaseCrashlyticsInternal:GetInstance(FirebaseApp, InitResult&)
2021/11/09 19:05:53.566 28667 28744 Error Unity Firebase.Crashlytics.AndroidImpl:.ctor()
2021/11/09 19:05:53.566 28667 28744 Error Unity Firebase.Crashlytics.Impl:Make()
2021/11/09 19:05:53.566 28667 28744 Error Unity Firebase.Crashlytics.PlatformAccessor:.cctor()
2021/11/09 19:05:53.566 28667 28744 Error Unity Firebase.Crashlytics.Crashlytics:Initialize()
2021/11/09 19:05:53.566 28667 28744 Error Unity System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
2021/11/09 19:05:53.566 28667 28744 Error Unity Firebase.FirebaseApp:InitializeCrashlyticsIfPresent()
2021/11/09 19:05:53.566 28667 28744 Error Unity System.Func`1:Invoke()
2021/11/09 19:05:53.566 28667 28744 Error Unity Firebase.FirebaseApp:CreateAndTrack(CreateDelegate, FirebaseApp)
2021/11/09 19:05:53.566 28667 28744 Error Unity Firebase.Analytics.FirebaseAnalytics:.cctor()
2021/11/09 19:05:53.566 28667 28744 Error Unity CapUnity.Services.Stat.FirebaseStatService:SetUserProperty(String, String)
2021/11/09 19:05:53.566 28667 28744 Error Unity Escape.<OnAppStart>d__98:MoveNext()
2021/11/09 19:05:53.566 28667 28744 Error Unity System.Threading.ContextCallback:Invoke(Object)
2021/11/09 19:05:53.566 28667 28744 Error Unity System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
2021/11/09 19:05:53.566 28667 28744 Error Unity System.Runtime.CompilerServices.MoveNextRunner:Run()
2021/11/09 19:05:53.566 28667 28744 Error Unity System.Action
2021/11/09 19:05:53.566 28667 28744 Error firebase Unable to find Method com/google/firebase/crashlytics/ndk/FirebaseCrashlyticsNdk.getInstance (signature '()Lcom/google/firebase/crashlytics/ndk/FirebaseCrashlyticsNdk;', static).  Please verify the AAR which contains the com/google/firebase/crashlytics/ndk/FirebaseCrashlyticsNdk class is included in your app.

Activity

  1. PrisedRabbit commented on Nov 9, 2021

    @PrisedRabbit

    Same here, but Unity 2020.3.22:

      E/Unity: ApplicationException: Unable to find Method com/google/firebase/crashlytics/ndk/FirebaseCrashlyticsNdk.getInstance (signature '()Lcom/google/firebase/crashlytics/ndk/FirebaseCrashlyticsNdk;', static).  Please verify the AAR which contains the com/google/firebase/crashlytics/ndk/FirebaseCrashlyticsNdk class is included in your app.
      at Firebase.Crashlytics.FirebaseCrashlyticsInternal.GetInstance (Firebase.FirebaseApp app, Firebase.InitResult& init_result_out) [0x00000] in <00000000000000000000000000000000>:0 
      at Firebase.Crashlytics.AndroidImpl..ctor () [0x00000] in <00000000000000000000000000000000>:0 
      at Firebase.Crashlytics.Impl.Make () [0x00000] in <00000000000000000000000000000000>:0 
      at Firebase.Crashlytics.Crashlytics+PlatformAccessor..cctor () [0x00000] in <00000000000000000000000000000000>:0 
      at Firebase.Crashlytics.Crashlytics.Initialize () [0x00000] in <00000000000000000000000000000000>:0 
      at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAtt
    
  2. AjayC-Bsw commented on Nov 9, 2021

    @AjayC-Bsw

    Same Problem with Unity 2019.4.30
    Firebase Unity SDK version: 8.6.0
    Google Admob - 6.1.2
    Scripting Backend - IL2CPP and MONO

    Unable to find Method com/google/firebase/crashlytics/ndk/FirebaseCrashlyticsNdk.getInstance (signature '()Lcom/google/firebase/crashlytics/ndk/FirebaseCrashlyticsNdk;', static). Please verify the AAR which contains the com/google/firebase/crashlytics/ndk/FirebaseCrashlyticsNdk class is included in your app.

    method_ids[i] || (method.optional == kMethodOptional)
    Firebase.Crashlytics.CrashlyticsInternalPINVOKE:FirebaseCrashlyticsInternal_GetInstance__SWIG_0(HandleRef, Int32&)
    Firebase.Crashlytics.FirebaseCrashlyticsInternal:GetInstance(FirebaseApp, InitResult&)
    Firebase.Crashlytics.AndroidImpl:.ctor()
    Firebase.Crashlytics.Impl:Make()
    Firebase.Crashlytics.PlatformAccessor:.cctor()
    Firebase.Crashlytics.Crashlytics:Initialize()
    System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
    Firebase.FirebaseApp:InitializeCrashlyticsIfPresent()
    System.Func1:Invoke() Firebase.FirebaseApp:CreateAndTrack(CreateDelegate, FirebaseApp) CrashlyticsInit:<Start>b__4_0(Task1)
    System.Action1:Invoke(T) Firebase.Extensions.<ContinueWithOnMainThread>c__AnonStorey9:<>m__0() System.Func1:Invoke()
    Firebase.c__AnonStorey1`1:<>m__0()
    System.Action:Invoke()
    Firebase.ExceptionAggregator:Wrap(Action)
    Firebase.Dispatcher:PollJobs()
    Firebase.Platform.FirebaseHandler:Update()

  3. paulinon commented on Nov 9, 2021

    @paulinon
    Contributor

    Thanks for reporting this, @keepup.

    May I know how this issue could be replicated so that we can identify what's causing this? Could you also confirm if your implementation is using the IL2CPP scripting backend?

  4. added
    needs-infoNeed information for the developer
    and removed
    needs-infoNeed information for the developer
    on Nov 9, 2021
  5. mrichards commented on Nov 9, 2021

    @mrichards

    Hi @keepup & @AjayC-Bsw, it looks like the version of Crashlytics for Android didn't get updated with this release of our Unity SDK. The following workaround should resolve the problem:

    Open Assets/Firebase/Editor/CrashlyticsDependencies.xml. Change the version of com.google.firebase:firebase-crashlytics-ndk:18.0.1 to 18.2.4.

    This will cause the dependency resolver to download the correct version of the Crashlytics Android SDK, which includes the missing method identified in the error message. Subsequent builds should work as expected.

    Our next release will include the correct dependency version, so this workaround will not be required in the future.

  6. self-assigned this
    on Nov 9, 2021
  7. solinvictus1313 commented on Nov 9, 2021

    @solinvictus1313

    The workaround seems to work nicely. I still have to check the actual crash reporting functionality after this upgrade, but this brings me a lot closer. Thanks a lot @mrichards

    11-09 21:17:36.663 21521 21521 I FirebaseCrashlytics: Initializing Firebase Crashlytics 18.2.4 for com.asd.xyz
    11-09 21:17:37.905 21521 21606 D libcrashlytics: Initializing libcrashlytics version 3.1.0
    11-09 21:17:37.906 21521 21606 D libcrashlytics: Initializing native crash handling successful.
    
  8. a-maurice commented on Nov 9, 2021

    @a-maurice
    Contributor

    We've just released a new version, 8.6.1, which has the correct Assets/Firebase/Editor/CrashlyticsDependencies.xml file. Thanks for bringing this issue to our attention.

  9. locked and limited conversation to collaborators on Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions