0

I need to pass this to my Android app so I will get null pointer stacktraces:

-XX:-OmitStackTraceInFastThrow

(From other stackoverflow question) This guide shows how to do it, BUT the arguments tab is NOT there for an android app, only normal java apps: http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fguide%2Ftools%2Flaunchers%2Farguments.htm

So how do I do it for Android apps or should I do something completely different?

1
  • 1
    You already get a stack trace for a NullPointerException in LogCat. Commented Oct 11, 2014 at 16:25

1 Answer 1

2

That's not going to work. That is a command line argument for a JVM. Android doesn't have a JVM. In Android, your bytecodes are executed by Dalvik, a virtual machine that is quite, quite different.

One of the ways in which it is different is that it is started, more or less, when your phone boots. Even if it did recognize that particular command line argument, when your application starts, Dalvik has already been running for a while. You can't pass a command line argument.

Sign up to request clarification or add additional context in comments.

2 Comments

I see... any way I can get the stacktrace then?
Sure! As @CommonsWare says, look in your Logcat

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.