Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

App Crashes All The Time #136

Closed
jonathan-austen opened this issue Jan 16, 2018 · 6 comments
Closed

App Crashes All The Time #136

jonathan-austen opened this issue Jan 16, 2018 · 6 comments

Comments

@jonathan-austen
Copy link

If you are creating an issue for a BUG please fill out this information. If you are asking a question or requesting a feature you can delete the sections below.

Failure to fill out this information will result in this issue being closed. If you post a full stack trace in a bug it will be closed, please post it to http://gist.github.com and then post the link here.

Bug Information

Version Number of Plugin: 3.0.3
Device Tested On:
Simulator Tested On: Android Emulator API25
Version of VS: 2017 PRO
Version of Xamarin: latest
Versions of other things you are using:

Steps to reproduce the Behavior

Created this function and when I call it, the emulator crashes.

    public bool IsConnected()
    {
        if (!CrossConnectivity.IsSupported)
            return true;

        if (!CrossConnectivity.Current.IsConnected)
            return false;   
        else
            return true;
    }

Expected Behavior

App should not crash.

Actual Behavior

Code snippet

    public bool IsConnected()
    {
        if (!CrossConnectivity.IsSupported)
            return true;

        if (!CrossConnectivity.Current.IsConnected)
            return false;   
        else
            return true;
    }

Screenshots

@jamesmontemagno
Copy link
Owner

What is the stack trace?

@jonathan-austen
Copy link
Author

There is no stack trace. The app just says it's quitting and the error in Visual Studio is:

Java.Lang.ClassNotFoundException:

@jamesmontemagno
Copy link
Owner

Yes, read this: #131

@jamesmontemagno
Copy link
Owner

The work around would be to get the latest xamarin fixes or to remove the custom application class i add and manually set the current activity.

@jonathan-austen
Copy link
Author

jonathan-austen commented Jan 16, 2018

Well, I'm sure I have the latest xamarin fixes and the other part I don't know what to do. I'll just use someone else's code that isn't so buggy.

@jamesmontemagno
Copy link
Owner

This has to do with an issue in Xamarin.Android itself and not with my code. I don't appreciate comments like that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants