Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException: Null reference used for synchronization (monitor-enter) #25

Open
kengleong opened this issue Dec 23, 2015 · 0 comments

Comments

@kengleong
Copy link

FATAL EXCEPTION: main
Process: com.wokelchords.app.auctionhero, PID: 8207
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wokelchords.app.auctionhero/com.vijay.jsonwizard.activities.JsonFormActivity}: java.lang.NullPointerException: Null reference used for synchronization (monitor-enter)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: java.lang.NullPointerException: Null reference used for synchronization (monitor-enter)
at com.vijay.jsonwizard.activities.JsonFormActivity.getStep(JsonFormActivity.java:54)
at com.vijay.jsonwizard.fragments.JsonFormFragment.getStep(JsonFormFragment.java:162)
at com.vijay.jsonwizard.presenters.JsonFormFragmentPresenter.addFormElements(JsonFormFragmentPresenter.java:43)
at com.vijay.jsonwizard.fragments.JsonFormFragment.onViewCreated(JsonFormFragment.java:69)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1086)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1613)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:330)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:547)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1220)
at android.app.Activity.performStart(Activity.java:5949)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360) 
at android.app.ActivityThread.access$800(ActivityThread.java:144) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5221) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) 

I am running with
compileSdkVersion 23
buildToolsVersion "23.0.2"

Got an error when trying to implement the library.

java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.

Therefore i added this line in AndroidManifest.xml

<activity
    android:name="com.vijay.jsonwizard.activities.JsonFormActivity"
    android:theme="@style/Theme.AppCompat.Light.NoActionBar">
</activity>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant