我已经在应用程序中实现了Crashlytics。我尝试了所有关于stackoverflow的答案,因为建议的代码也迁移到了Androidx。仍然无法解决这个问题。 请检查日志中的错误。 出现以下错误:
ERROR Error: Uncaught (in promise): Error: Template parse errors:
'nb-card-header' is not a known element:
1. If 'nb-card-header' is an Angular component, then verify that it is part of this module.
2. If 'nb-card-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. (" <div *ngFor="let customer of values" class="col-md-12 col-lg-6 col-xxxl-6">
<nb-card>
[ERROR ->]<nb-card-header>{{customer.name}}</nb-card-header>
<nb-card-body>
<p>Beautifull"): ng:///PagesModule/CustomerComponent.html@3:8
项目级Build.gradle文件
com.example.example E/CrashlyticsCore: Failed to execute task.
java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(FutureTask.java:176)
at com.crashlytics.android.core.CrashlyticsBackgroundWorker.submitAndWait(CrashlyticsBackgroundWorker.java:41)
at com.crashlytics.android.core.CrashlyticsController.handleUncaughtException(CrashlyticsController.java:321)
at com.crashlytics.android.core.CrashlyticsController$6.onUncaughtException(CrashlyticsController.java:301)
at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.uncaughtException(CrashlyticsUncaughtExceptionHandler.java:42)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
08-09 16:53:53.056 26292-26292/com.example.example E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.example, PID: 26292
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.example/com.example.example.MainActivity}: java.lang.IllegalAccessException: com.example.example.MainActivity() is not accessible from class android.app.Instrumentation
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2551)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1430)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5910)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
Caused by: java.lang.IllegalAccessException: com.example.example.MainActivity() is not accessible from class android.app.Instrumentation
at java.lang.Class.newInstance(Class.java:1687)
at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2541)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1430)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5910)
应用程序级Build.gradle文件。
buildscript {
repositories {
jcenter()
google() // Google's Maven repository
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.0'
// Add dependency
classpath 'io.fabric.tools:gradle:1.31.0' // Crashlytics plugin
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
} }
allprojects {
repositories {
google()
jcenter()} }
任何人都可以帮助我所缺少的东西。