Giter Site home page Giter Site logo

Comments (3)

Metori avatar Metori commented on August 11, 2024

After "Unfortunetely App has stopped" you will receive stack trace in LogCat. Did you read it?

from mikrotik-java.

GideonLeGrange avatar GideonLeGrange commented on August 11, 2024

@AmrSubZero You seem to be instantiating the app correctly. I will need to see a stack trace to understand the problem. Can you get a stack trace?

from mikrotik-java.

GideonLeGrange avatar GideonLeGrange commented on August 11, 2024

@AmrSubZero

Having thought about this some more, I speculate that the code is causing a Throwable or RuntimeException. I see you have a catch there with a printStackTrace(), so assuming you can get the output of a print, I suggest you change your code like this:

public class MainActivity extends ActionBarActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        try {
            ApiConnection.connect("192.168.1.2");
        } catch (MikrotikApiException e) {
            e.printStackTrace();
        }
        catch (Throwable e) {
            e.printStackTrace();
        }
    }
}

At least we'll then be able to pick up why the app is stopping. Please let me know, or if this issue is no longer relevant, please close the issue.

from mikrotik-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.