0

On allocating memory for a Path variable i ran into the following runtime exception:

Exception in thread "main" java.lang.RuntimeException: Stub!

at android.graphics.Path.<init>(Path.java:24) at com.tg.MindGames.set.settings.CardStyle.getCard(CardStyle.java:17) at com.tg.MindGames.set.Test.main(Test.java:16) at sun.reflect.NativeMethodAccessorImpl.invoke(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

Process finished with exit code 1

My Code is:

import android.graphics.Path;
public class CardStyle {
   public static void getCard(String shapeName, int amount){
      Path p = new Path();
   }
}

What went wrong?

1 Answer 1

0

Found out the Problem:

I ran a public static void main to test certain features so I didnt compile an Android app but a standard java application. When I compile it as an Android app testing the feature in my main activity it works.

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

Comments

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.