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

NPE: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText #212

Open
ber4444 opened this issue Nov 18, 2020 · 5 comments

Comments

@ber4444
Copy link

ber4444 commented Nov 18, 2020

Caused by:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
   com.willowtreeapps.hyperion.core.internal.HyperionPluginView.<init>(HyperionPluginView.java:46)
   com.willowtreeapps.hyperion.core.internal.HyperionPluginView.<init>(HyperionPluginView.java:36)
   com.willowtreeapps.hyperion.core.internal.HyperionPluginView.<init>(HyperionPluginView.java:32)
   com.willowtreeapps.hyperion.core.internal.InstallationLifecycleDelegate.onActivityCreated(InstallationLifecycleDelegate.java:56)
   com.willowtreeapps.hyperion.core.internal.Lifecycle.onActivityCreated(Lifecycle.java:24)
   com.willowtreeapps.hyperion.core.internal.HyperionIgnoreFilter.onActivityCreated(HyperionIgnoreFilter.java:26)
   android.app.Application.dispatchActivityCreated(Application.java:417)
   android.app.Activity.dispatchActivityCreated(Activity.java:1202)
   android.app.Activity.onCreate(Activity.java:1475)
   androidx.core.app.ComponentActivity.onCreate(ComponentActivity.java:85)
   androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:154)
   androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:312)
   androidx.appcompat.app.AppCompatActivity.onCreate(AppCompatActivity.java:115)
@michaelmwhite
Copy link
Contributor

michaelmwhite commented Nov 20, 2020

Can you provide more info on this? What actions were you doing when you encountered this, what Android version were you using, and what device was this on? @ber4444

@ushi3
Copy link

ushi3 commented Dec 3, 2020

In the past, we had the same exception.
In our environment, when this happens, by doing a clean build and install app again to solved.

Our Study

In our study, this exception may not by Hyperion.

The cause is unknown, the Resource IDs into resource XML may not be updated when building the app.
Referenced Resource ID in resource XML are expanded to inline resource ID at app building. (ex. @+id/foo to @ref/0x7f090103)

And when that happens, cause issue's exception on runtime.
However, Hyperion is the first to reference any resource ID at runtime, so occur this issue's problem. This is a coincidence.
if the resource ID is not updated, the resource string may be different at runtime.

We couldn't fix this problem. but we no longer see occur it.
so that's why we stopped looking into this. that all the information we can given.

@Toubap
Copy link

Toubap commented Jan 21, 2021

same thing happening to me

@nishtahir
Copy link
Member

@Toubap Have you got any more information about what actions were you doing when you encountered this, what Android version were you using, and what device was this on?

@nishtahir nishtahir changed the title NPE NPE: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText Jan 22, 2021
@HectorCardoso53
Copy link

tambem aconteceu comigo

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

6 participants