I am trying to integrate Firebase Crashlytics into my current project in Android Studio 3.1.4. The first time I forced a FirebaseCrash.report, I got this in my logcat:
08-10 07:25:25.114 16661-16718/com.example.android.twlistsales E/FirebaseCrash: Failed to initialize crash reporting
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzcaq;
at java.util.concurrent.FutureTask.report(FutureTask.java:123)
at java.util.concurrent.FutureTask.get(FutureTask.java:207)
at com.google.firebase.crash.zze.run(Unknown Source:6)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzcaq;
at com.google.android.gms.internal.zzdzp.<clinit>(Unknown Source:8)
at com.google.android.gms.internal.zzdzp.initialize(Unknown Source:0)
at com.google.firebase.crash.zzc.zzbsq(Unknown Source:2)
at com.google.firebase.crash.zzd.call(Unknown Source:2)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.internal.zzcaq" on path: DexPathList[[zip file "/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/base.apk", zip file "/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/split_lib_resources_apk.apk", zip file "/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/lib/arm64, /system/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.android.gms.internal.zzdzp.<clinit>(Unknown Source:8)
at com.google.android.gms.internal.zzdzp.initialize(Unknown Source:0)
at com.google.firebase.crash.zzc.zzbsq(Unknown Source:2)
at com.google.firebase.crash.zzd.call(Unknown Source:2)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Suppressed: java.io.IOException: No original dex files found for dex location (arm64) /data/app/com.example.android.twlistsales-fs1zdAnDopYdjq5hyiS8pw==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:353)
at dalvik.system.DexFile.<init>(DexFile.java:100)
at dalvik.system.DexFile.<init>(DexFile.java:74)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
at dalvik.system.DexPathList.<init>(DexPathList.java:157)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:69)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:36)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:678)
Then this:
08-10 07:25:25.115 16661-16718/com.example.android.twlistsales E/FirebaseCrash: at android.app.LoadedApk.getClassLoader(LoadedApk.java:711)
at android.app.LoadedApk.getResources(LoadedApk.java:944)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2303)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5943)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Then this:
08-10 07:25:25.117 16661-16719/com.example.android.twlistsales E/FirebaseCrash: Failed waiting for crash api to load.
java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1063)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1352)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:278)
at com.google.firebase.crash.FirebaseCrash.zzbsk(Unknown Source:6)
at com.google.firebase.crash.FirebaseCrash.zza(Unknown Source:0)
at com.google.firebase.crash.zza.run(Unknown Source:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
And finally this, which is the error that I forced:
08-10 07:25:25.907 16661-16722/com.example.android.twlistsales E/**ListSales - GetSales - doInBackground(): Attempt to get sales data from database failed due to JSON Exception
org.json.JSONException: Value Foo<br of type java.lang.String cannot be converted to JSONArray
at org.json.JSON.typeMismatch(JSON.java:111)
at org.json.JSONArray.<init>(JSONArray.java:96)
at org.json.JSONArray.<init>(JSONArray.java:108)
at com.example.android.twlistsales.ListSales$GetSales.doInBackground(ListSales.java:604)
at com.example.android.twlistsales.ListSales$GetSales.doInBackground(ListSales.java:555)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Does anyone know what is happening here? I'm new to Firebase and don't know my way around.
I'm guessing the problem relates to the instructions that I see when I click on Tools/Firebase/Crash Reporting, specifically step 5. It tells me to deobfuscate Proguard by adding this to my gradle files.
debug {
minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
The problem is that it doesn't tell me WHICH gradle file or WHERE in that file to put this code. Can someone enlighten me? Also, how could I send a request to the Android Studio people to kindly clarify these instructions so the next person along doesn't have the exact same problem?
I'm new to both Android Studio and Gradle so the correct place to put this code is not remotely obvious to me the way it might be to a developer more experienced in this environment. I'm guessing it goes into the app-level Gradle.build but I'm not sure if it's within the android{} group of parameters or whether it is between android{} and dependecies{}. I could spend hours figuring this out by trial and error....
Assumuning you want to obfuscate your code only in the release verion of your app (which is the most common case), the lines
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
should be included in
android{
buildTypes {
release {
<here>
}
}
}
inside your app's level build.gradle file.
However, by looking at your stack trace, it seems that you have a missing dependency problem you should take care of before obfuscating your code (which is optional, especially if you're not much experienced).
Related
I want to build an app with Ionic V3 for Android but I have an issue when I build it on release.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
Exception in thread "Build Event Notification" java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.security.Provider$Service.getImplClass(Provider.java:1728)
at java.security.Provider$Service.newInstance(Provider.java:1686)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
at com.crashlytics.reloc.org.apache.http.ssl.SSLContexts.createDefault(SSLContexts.java:51)
at com.crashlytics.reloc.org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:966)
at com.crashlytics.reloc.org.apache.http.impl.client.HttpClients.createDefault(HttpClients.java:56)
at com.crashlytics.api.net.proxy.ProxySettings.getClientFor(ProxySettings.java:56)
at com.crashlytics.api.RestfulWebApi.notifyBuildEvent(RestfulWebApi.java:1438)
at com.crashlytics.api.RestfulWebApi.access$100(RestfulWebApi.java:74)
at com.crashlytics.api.RestfulWebApi$10.run(RestfulWebApi.java:1371)
at java.lang.Thread.run(Thread.java:748)
It seems to be caused by Crashlytics (which I don't even use) which is integrated within this package https://github.com/dpa99c/cordova-plugin-firebasex.
When I build the app in debug mode, I still have the exception but the build proceed until the end and I still can run it on my phone.
How can I prevent this issue ? Is there anyway to disable entirely Crashlytics so I don't have this exception anymore ?
Thanks
Ok, so it was all because of the JDK version. I ended up updating the JDK and everything worked perfectly.
When I build the sample corda project with gradle on windows (gradlew.bat deployNodes)
I see the error about DELETE command in log4j:
2019-10-28 16:30:47,207 main ERROR Delete contains invalid attributes "IfFileName", "IfLastModified"
2019-10-28 16:30:47,213 main ERROR Missing Delete conditions: unconditional Delete not supported
2019-10-28 16:30:47,217 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.rolling.action.DeleteAction for element Delete: java.lang.IllegalArgume
ntException: Unconditional Delete not supported java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:136)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:964)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:904)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:548)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:620)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:637)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231)
at org.apache.logging.log4j.core.async.AsyncLoggerContext.start(AsyncLoggerContext.java:76)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:121)
at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46)
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
at net.corda.core.utilities.KotlinUtilsKt.contextLogger(KotlinUtils.kt:42)
at net.corda.cliutils.CliWrapperBase$Companion$logger$2.invoke(CordaCliWrapper.kt:108)
at net.corda.cliutils.CliWrapperBase$Companion$logger$2.invoke(CordaCliWrapper.kt:107)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at net.corda.cliutils.CliWrapperBase$Companion.getLogger(CordaCliWrapper.kt:65535)
at net.corda.cliutils.CliWrapperBase$Companion.access$getLogger$p(CordaCliWrapper.kt:107)
at net.corda.cliutils.CliWrapperBase.call(CordaCliWrapper.kt:142)
at net.corda.cliutils.CliWrapperBase.call(CordaCliWrapper.kt:106)
at picocli.CommandLine.execute(CommandLine.java:1173)
at picocli.CommandLine.access$800(CommandLine.java:141)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1367)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1335)
at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1243)
at picocli.CommandLine.parseWithHandlers(CommandLine.java:1526)
at net.corda.cliutils.CordaCliWrapperKt.start(CordaCliWrapper.kt:73)
at net.corda.node.Corda.main(Corda.kt:13)
Caused by: java.lang.IllegalArgumentException: Unconditional Delete not supported
at org.apache.logging.log4j.core.appender.rolling.action.DeleteAction.(DeleteAction.java:71)
at org.apache.logging.log4j.core.appender.rolling.action.DeleteAction.createDeleteAction(DeleteAction.java:212)
... 43 more
2019-10-28 16:30:47,606 main ERROR Null object returned for Delete in DefaultRolloverStrategy.
2019-10-28 16:30:47,736 main ERROR Delete contains invalid attributes "IfFileName", "IfLastModified"
2019-10-28 16:30:47,737 main ERROR Missing Delete conditions: unconditional Delete not supported
2019-10-28 16:30:47,739 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.rolling.action.DeleteAction for element Delete: java.lang.IllegalArgume
ntException: Unconditional Delete not supported java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:136)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:964)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:904)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:548)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:620)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:637)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231)
at org.apache.logging.log4j.core.async.AsyncLoggerContext.start(AsyncLoggerContext.java:76)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:121)
at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46)
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
at net.corda.core.utilities.KotlinUtilsKt.contextLogger(KotlinUtils.kt:42)
at net.corda.cliutils.CliWrapperBase$Companion$logger$2.invoke(CordaCliWrapper.kt:108)
at net.corda.cliutils.CliWrapperBase$Companion$logger$2.invoke(CordaCliWrapper.kt:107)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at net.corda.cliutils.CliWrapperBase$Companion.getLogger(CordaCliWrapper.kt:65535)
at net.corda.cliutils.CliWrapperBase$Companion.access$getLogger$p(CordaCliWrapper.kt:107)
at net.corda.cliutils.CliWrapperBase.call(CordaCliWrapper.kt:142)
at net.corda.cliutils.CliWrapperBase.call(CordaCliWrapper.kt:106)
at picocli.CommandLine.execute(CommandLine.java:1173)
at picocli.CommandLine.access$800(CommandLine.java:141)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1367)
at picocli.CommandLine$RunLast.handle(CommandLine.java:1335)
at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1243)
at picocli.CommandLine.parseWithHandlers(CommandLine.java:1526)
at net.corda.cliutils.CordaCliWrapperKt.start(CordaCliWrapper.kt:73)
at net.corda.node.Corda.main(Corda.kt:13)
Caused by: java.lang.IllegalArgumentException: Unconditional Delete not supported
at org.apache.logging.log4j.core.appender.rolling.action.DeleteAction.(DeleteAction.java:71)
at org.apache.logging.log4j.core.appender.rolling.action.DeleteAction.createDeleteAction(DeleteAction.java:212)
... 43 more
I got latest verison of corda samples. (from master branch). I encounter the same problem with other branches.
My jdk version is 1.8.0_212.
I used cordapp-examples project
How can I solve this problem?
It looks to me like you are pulling in JAR files from somewhere other than those specified by the Corda build.
The default branch for the samples is release-V4 and that is the one I'm using. I run the following and it works fine:
git clone https://github.com/corda/samples
cd cordapp-example
gradlew deployNodes
I'd check that your classpath variable isn't set (as this will cause additional JAR files in those directories to be included when running Corda) by running :
echo %CLASSPATH%
Additionally, from the command-line I'd run:
java -version
where java
To make sure the version of java you think you're picking up is the one you are picking up.
I had a similar issue related to log4j:
the log4j2 error unable to invoke factory method in class class RollingFileApender
Error while generating node info file
To fix this (on windows), I took the following steps:
Right click on MyPC
Click advanced system settings
Click environment variables
Change JAVA_HOME to point to same jdk directory being used in IntelliJ for corDapp. (I changed mine from OpenJDK\jdk-13.0.1 to C:\Program Files\Java\jdk1.8.0_231)
Restart IntelliJ and rerun ./gradlew deployNodes
The problem was about the regional settings of my computer.
By defining an Environment variable
JAVA_TOOL_OPTIONS=-Duser.language=en -Duser.country=US -Duser.region=US -Dfile.encoding=UTF-8 -Duser.variant=US
I solved the problem.
Thanks all for your attention.
Ever since I added cloud messaging to my Flutter app, the app crashes on load.
It works fine on iOS.
As far as I can tell its all set up properly, and the fact that It works on iOS I am at a loss..
This is the logcat file
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/internal/InternalTokenProvider;
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:453)
at java.lang.Class.forName(Class.java:378)
at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common##17.0.0:78)
at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common##17.0.0:71)
at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common##17.0.0:468)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common##17.0.0:354)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common##17.0.0:321)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common##17.0.0:305)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common##17.0.0:53)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common##17.0.0:47)
at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853)
at android.app.ActivityThread.access$1100(ActivityThread.java:199)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
2019-06-05 13:02:06.390 7346-7346/? E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.internal.InternalTokenProvider" on path: DexPathList[[zip file "/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/base.apk", zip file "/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_dependencies_apk.apk", zip file "/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_resources_apk.apk", zip file "/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_0_apk.apk", zip file "/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_1_apk.apk", zip file "/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_2_apk.apk", zip file "/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_3_apk.apk", zip file "/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_4_apk.apk", zip file "/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_5_apk.apk", zip file "/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_6_apk.apk", zip file "/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_7_apk.apk", zip file "/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_8_apk.apk", zip file "/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/lib/x86, /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/base.apk!/lib/x86, /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_dependencies_apk.apk!/lib/x86, /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_resources_apk.apk!/lib/x86, /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_0_apk.apk!/lib/x86, /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_1_apk.apk!/lib/x86, /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_2_apk.apk!/lib/x86, /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_3_apk.apk!/lib/x86, /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_4_apk.apk!/lib/x86, /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_5_apk.apk!/lib/x86, /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_6_apk.apk!/lib/x86, /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_7_apk.apk!/lib/x86, /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_8_apk.apk!/lib/x86, /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_slice_9_apk.apk!/lib/x86, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 24 more
Suppressed: java.io.IOException: No original dex files found for dex location /data/app/org.heartchurch.heartland-M4kZV3m1AevnHc2GxsBI5A==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:354)
at dalvik.system.DexFile.<init>(DexFile.java:101)
at dalvik.system.DexFile.<init>(DexFile.java:75)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:394)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:354)
at dalvik.system.DexPathList.<init>(DexPathList.java:164)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:74)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
2019-06-05 13:02:06.391 7346-7346/? E/AndroidRuntime: at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:74)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:40)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:727)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:810)
at android.app.LoadedApk.getResources(LoadedApk.java:1032)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2345)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5749)
... 8 more
I have made sure the following is added to my manifest
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Open the android project.
Go the build.gradle of firebase_messaging
In the dependencies change api 'com.google.firebase:firebase-messaging:18.0.0' to
api 'com.google.firebase:firebase-messaging:17.3.3'
Make sure you are using the latest version of all the cloud dependencies in pubspec.yaml
This solution worked for me
I have built a Camel project in Eclipse with Maven dependencies.
It ran successfully and also Built the Jar file and ran it from the command prompt
which is running as required. But when I moved the JAR file onto to our Linux machine
which is like a Job Manager server and when I try to run the JAR file as below
I am getting the below error message.
When I try to run with the below command
$ java –jar mycamelproject
I am getting the below error, but I do have the below mentioned dependency in the Dependency-Jars folder.
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/c
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getMethod0(Class.java:2774)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.springframework.context.support
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
Then I tried running with the below command.
$ mvn -X exec:java -Dexec.mainClass=mycamelpackage.mycamelmainclass
I am getting a series of the below errors such as below
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (/home/ec2-user/.m2/repository)
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from
http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): proxy.host.net
[ERROR] No plugin found for prefix 'exec' in the current project
and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo]
available from the repositories
How should java –jar mycamelproject work if no classpath is set? And mycamelproject should be a JAR file anyway (and if it is, you should add the *.jar extension).
Beside that, I guess your local Maven repository may be corrupt. That's usually the reason why you see the resolution will not be reattempted error message. The easiest way to fix this is to remove the corrupt directories and start Maven again.
I'm having trouble running a custom jar on Elastic Map-Reduce
I'm using jdk1.6.0_26, Hadoop 0.20.205, and compiling with Eclipse on my computer and everything works perfectly fine
for example if I ran the following on my computer it would be successful
hadoop jar MaxTemperature.jar input/temperature.txt output
I specified the jar as the following on AWS
s3n://chrishadoop/MaxTemperature.jar
and I specified the arguments as
s3n://chrishadoop/input/temperature.txt s3n://chrishadoop/output
I did not specify the main class because I pointed to it in the manifest
Here is the jar I'm using, I will make it public for a little while
https://s3.amazonaws.com/chrishadoop/MaxTemperature.jar
Here is the error I'm getting
2012-07-08 19:31:39,824 INFO com.amazonaws.elasticmapreduce.statepusher.StatePusher (main): Pusher awoke, starting to push data into simpledb...
2012-07-08 19:31:40,552 FATAL com.amazonaws.elasticmapreduce.statepusher.StatePusher (main): Fatal Exception raised while extracting data from hadoop and pushing to simpledb
java.lang.NoClassDefFoundError: org/codehaus/jackson/map/JsonMappingException
at com.amazonaws.elasticmapreduce.statepusher.StatePusher.run(StatePusher.java:65)
at com.amazonaws.elasticmapreduce.statepusher.StatePusher.main(StatePusher.java:205)
Caused by: java.lang.ClassNotFoundException: org.codehaus.jackson.map.JsonMappingException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 2 more
There is a version of Jackson which is installed as part of the AMI, and I'm guessing you're bundling a different version of Jackson? The error seems to be happening in the support code which makes "enable debugging" work.