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

scaleView is null and causing exceptions #12

Open
ahaverty opened this issue Jan 12, 2018 · 1 comment
Open

scaleView is null and causing exceptions #12

ahaverty opened this issue Jan 12, 2018 · 1 comment

Comments

@ahaverty
Copy link

The latest version implementation 'pub.hanks:smallbang:1.2.2' is crashing on load. It looks like onMeasure override isn't being called in my scenario. Debugging shows that onMeasure isn't called in my case, and crashes here when calling likeAnimation.

I'm also having trouble downloading the old working smallbang on my CI. Is it still available on maven?

 E/UncaughtException: java.lang.RuntimeException: Unable to start activity ComponentInfo: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setScaleX(float)' on a null object reference
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
    at android.app.ActivityThread.-wrap11(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
 Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setScaleX(float)' on a null object reference
    at xyz.hanks.library.bang.SmallBangView.likeAnimation(SmallBangView.java:190)
    at xyz.hanks.library.bang.SmallBangView.likeAnimation(SmallBangView.java:181)
    at myapppackage.fragments.MyFragment.animateView(MyFragment.java:107)
    at myapppackage.fragments.MyFragment.setQuantity(MyFragment.java:97)
    at myapppackage.fragments.MyFragment.onCreateView(MyFragment.java:69)
    at android.support.v4.app.Fragment.performCreateView(Fragment.java:2261)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1419)
    at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1750)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1819)
    at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797)
    at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2590)
    at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2377)
    at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2332)
    at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2239)
    at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3231)
    at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3181)
    at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:192)
    at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:572)
    at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:177)
    at myapppackage.activities.MyAppActivity.onStart(MyAppActivity.java:29)
    at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1334)
    at android.app.Activity.performStart(Activity.java:7019)
@hanks-zyh
Copy link
Owner

@ahaverty could you please put more detail about your code? such as layout, or activities

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

2 participants