i am facing the app crash error in android studio when app try to run and the error which logcat is showing is below: **
- com.google.android.apps.nexuslauncher E/System: Uncaught exception thrown by finalizer 06-29 18:19:05.002 2840-2849/com.google.android.apps.nexuslauncher E/System: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.concurrent.BlockingQueue.isEmpty()' on a null object reference
** the home activity and welcome activity is written below
this is the welcome activity
void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_welcome);
Thread th = new Thread() {
@Override
public void run() {
try {
sleep(5000);
} catch (Exception e) {
e.printStackTrace();
} finally {
Intent home = new Intent(WelcomeActivity.this, HomeActivity.class);
startActivity(home);
}
}
};
}
@Override
protected void onPause()
{
super.onPause();
finish();
}
}
and now this is home activity
public class HomeActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
}
} in here home activity is not ready yet because i am working on the welcome activity. please help me to solve my issue thank you