Unable to install the fabric plugin (for crashlytics) on Android Studio - android

Unable to download the Fabric plugin on Android studio. I am able to download other plugins on the same network, so not an issue with the connectivity.
As an alternative, i tried manual installation of the plugin. But with manual installation, the plugin somehow does not launch (ends with an exception).
So I am back to this. Is anyone else facing this issue ?
P.S - I am on Android Studio 2.2.2
P.S - Below is the crash log when i install the plugin manually and restart Android Studio (Some part of the crash stack removed for brevity)
Plugin 'com.crashlytics.tools.androidstudio' failed to initialize and will be disabled. Please restart Android Studio.
java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of com/intellij/ide/plugins/cl/PluginClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of com/intellij/util/lang/UrlClassLoader) for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:299)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
at com.crashlytics.tools.bootstrap.osgi.OsgiBootstrapper.<clinit>(OsgiBootstrapper.java:54)
at com.crashlytics.tools.intellij.CrashlyticsPlugin.initComponent(CrashlyticsPlugin.java:89)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:522)
at

Related

NativeScript Build - Error executing Static Binding Generator: Class not found android.support.v4.view.ViewPager.OnPageChangeListener

I'm new to NativeScript and took over a project recently upgraded from NativeScript 4 to 6. Here is my environment detials:
Windows 10
Node v16.6.1
NativeScript 8.0.2
Android Studio 11 (with al
the recommended updates to date)
VS Code 1.58.2
I can create a new Native script project with "tns create" and build/run it in the simulator just fine. However, when I try to run the project the build throws the following error:
java.lang.RuntimeException: Class not found android.support.v4.view.ViewPager.OnPageChangeListener
at org.nativescript.staticbindinggenerator.Generator.getClass(Generator.java:551)
at org.nativescript.staticbindinggenerator.Generator.getInterfacesFromCache(Generator.java:534)
at org.nativescript.staticbindinggenerator.Generator.writeBinding(Generator.java:283)
at org.nativescript.staticbindinggenerator.Generator.generateBinding(Generator.java:171)
at org.nativescript.staticbindinggenerator.Generator.processRows(Generator.java:234)
at org.nativescript.staticbindinggenerator.Generator.generateBindings(Generator.java:121)
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:97)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:55)
Here is the run command I'm using: "tns run android --emulator"
I have tried tons of things and searches but no luck resolving this issue.
So I had an idea and searched with a different search engine than I normally use. I did find some ideas which helped me resolved the issue.
I had previously searched in VSCode for variations on "android.support.v4.view.ViewPager.OnPageChangeListener", but only found the log file with the error. Then I learned you have to change the filter options of the find in file search otherwise the files you are looking for can be excluded from the search results. I also used Baregrep to confirm I was getting everything.
I fixed the issue by replacing all occurrences of:
android.support.v4.view.ViewPager with androidx.viewpager.widget.ViewPager
Also you may need to install widgets:npm i tns-core-modules-widgets
Since the files where I made the changes were all non-project files (many of them in the node_modules directory) there is probably something else that involves updating Node or NativeScript that may solve this as well.
If someone else figures that out, I'll be watching this thread for updates, and thanks in advance!
Fissh

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceId; React Native App

I've been trying to run my react native application, but it crashed when started and the debugger didn't return any error, so I checked the log cat in Android Studio and it shows me the following error: java.lang.NoClassDefFoundError: Failed resolution of: Lcom / google / firebase / iid / FirebaseInstanceId;
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceId"
The React-Native version that I am using is: 0.61.5
And the version of react-native-firebase that I have installed is 5.6.0
It has already been a recent failure, since previously the app worked correctly and I have not made any changes to the firebase integration either
To debug this, first I would suggest running adb logcat and seeing what Java error you are getting. If it errors out on the not being able to find the required Java classes, then try adding the following to your project:
app/build.gradle file (dependencies section):
implementation 'com.google.firebase:firebase-iid'
(You might need to provide a version for this package as well)
I have getting same error, I fixed this error by uninstalling old version and installing new version of push notification.
uninstall:
npm uninstall react-native-push-notification
install:
npm i react-native-push-notification
since react-native-push-notification upgraded to new version v7.x so that, while installing app it give above error.
checkout this -> https://www.npmjs.com/package/react-native-push-notification
There is an issue, in react-native-push-notification (FirebaseInstanceId has been deprecated and now removed). Sounds like you are using a lib that is using that that here. It should be fixed later on, but for now you can add the following to your android/build.gradel file.
buildscript {
ext {
...
firebaseMessagingVersion = "21.0.0"
}
I had also to update these libs (you will get compile errors if you don't, so you may have others to update):
- "react-native-device-info": "^5.5.8",
+ "react-native-device-info": "^8.1.3",
- "react-native-push-notification": "^7.3.0",
+ "react-native-push-notification": "^7.3.1",
This is in reference to this issue
wix/react-native-notifications
This lib having issue with refreshToken() Method.
Didn't find class "com.google.firebase.iid.FirebaseInstanceId"
so just remove / reinstall the package, if still error is coming then we have to wait for next bug fix release of this lib or
we can manually change native code to make it working.
below is link of lib
https://github.com/wix/react-native-notifications/issues?q=FirebaseInstanceId

Cordova Android app force closes after build

Here's the error details:
12-04 22:00:12.087: E/AndroidRuntime(19113):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.package.name.dev/com.package.name.dev.MainActivity}:
java.lang.NullPointerException: Attempt to invoke virtual method 'void
org.apache.cordova.CordovaPlugin.privateInitialize(java.lang.String,
org.apache.cordova.CordovaInterface,
org.apache.cordova.CordovaWebView,
org.apache.cordova.CordovaPreferences)' on a null object reference
Background: I was originally only building the app for Android, but during my last release I had to generate an iOS build as well, which required some extra plugins and configuration tweaks to get functional. Now I'm trying to create a new release for Android, but the new app force closes as soon as it is opened.
In an effort to fix it, I tried to remove all references to the iOS-only plugins from the Android side of the project, but the error persists. I'm not sure what else to try.
What would provoke Cordova to throw this error when initializing plugins?
The issue was that one of the plugins had failed to copy its java classes into the Android app src directory when it was installed. I created the appropriate directory hierarchy and then copied in the java files from the /plugins/ dir.
To figure out which plugin caused the issue, I disabled the onload param from each feature one at a time (in the android.json file in the android platform directory) until the app successfully opened.

How to Solve "The "XamlCTask" task failed unexpectedly" error without updating xamarin.forms version

I am stuck in one of my issue in xamarin.forms. In my xamarin.form project xamarin.form package version is 2.3.2.123 in PCL,Android and IOS.
Since Last few days when I am trying to build my iphone project, its gives me an error
The "XamlCTask" task failed unexpectedly
So I have updated xamarin.form version in PCL, Droid and IOS.
but due to this I am facing issue in Android in one of my page
{Java.Lang.NullPointerException: Attempt to invoke virtual method
'boolean android.graphics.Bitmap.isMutable()' on a null object
reference at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
[0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0 …}
I am using
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
Instead
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
because I want to scroll page even when keyboard is open. If keyboard is open then page can't be scroll in android this is the bug of "App Compact".
Now I don't understand what should I do?
Is there any other way to solve "The "XamlCTask" task failed unexpectedly" error without updating xamarin.forms version.
because all the issues arise due to xamarin.forms updation.
In one of other project I am using same xamarin.forms version but it works perfectly. What is actual reason of "XamlC task failed" error?
Although the cause seems different, it looks like it's a known bug. Maybe you could verify that upgrading to the version mentioned in the bug (2.3.5-pre) works for you, and then either disable XAML compilation for the time being, or work with the Xamarin pre-release packages.

How to fix that error on android studio (gradle build)?

Recently when I started my android studio I got an annoying error in event log:
PicoPluginExtensionInitializationException: org.jetbrains.plugins.gradle.GradleManager has unsatisfied dependency: class org.jetbrains.plugins.gradle.service.GradleInstallationManager among unsatisfiable dependencies: [[class org.jetbrains.plugins.gradle.service.GradleInstallationManager]] where DefaultPicoContainer (root) was the leaf container being asked for dependencies.
and when i try to sync the gradle another message appear :
IllegalArgumentException: Can't retrieve external system settings for id 'Gradle'. Reason: no such external system is registered
how can i fix it ?

Categories

Resources