Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5985655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:33:40+00:00 2026-05-22T22:33:40+00:00

I get a NullPointerException when a url passed in webview in an activity (the

  • 0

I get a NullPointerException when a url passed in webview in an activity (the url is passed from previous activity), but it shows NullPointerException when control goes on webview.loadurl(url). I checked that there is a value in a passed url but I still don’t know why it gives an error?

This is Error:

06-07 15:13:43.689:ERROR/AndroidRuntime(1761): FATAL EXCEPTION: main 
06-07 15:13:43.689: ERROR/AndroidRuntime(1761): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.shopzilla.android.common/com.shopzilla.android.product.ProductStoreActivity}: java.lang.NullPointerException 
06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
 06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at android.os.Looper.loop(Looper.java:123)
06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at android.app.ActivityThread.main(ActivityThread.java:3683)
06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at java.lang.reflect.Method.invokeNative(Native Method) 
06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at java.lang.reflect.Method.invoke(Method.java:507)
06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at dalvik.system.NativeStart.main(Native Method)
06-07 15:13:43.689: ERROR/AndroidRuntime(1761): Caused by: java.lang.NullPointerException
06-0715:13:43.689: ERROR/AndroidRuntime(1761):     at com.shopzilla.android.product.ProductStoreActivity.onCreate(ProductStoreActivity.java:40)
06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-07 15:13:43.689: ERROR/AndroidRuntime(1761):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)

Code:

package com.shopzilla.android.product;

import android.app.Activity;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;

import com.shopzilla.android.common.R;

public class ProductStoreActivity extends Activity{

  ProgressDialog dialog;
  Dialog dialog1;
  int count=0;
  Bundle bundle;
  @Override
  public void onCreate(Bundle savedInstanceState)
  {
    super.onCreate(savedInstanceState);
    this.getWindow().requestFeature(Window.FEATURE_PROGRESS);
    dialog = ProgressDialog.show(this,"BIZRATE","Loading....");
    dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);

    setContentView(R.layout.storesitenew);
    bundle = getIntent().getExtras();
    //getWindow().setFeatureInt(Window.FEATURE_PROGRESS, Window.PROGRESS_VISIBILITY_ON);
    //Bundle bundle = getIntent().getExtras();
    WebView web = (WebView)findViewById(R.id.web_storesite);
    //MyWebViewClient web1 = new MyWebViewClient();
    //web1.shouldOverrideUrlLoading(web, ProductComparisonActivity.store_url);
    //web.getSettings().setJavaScriptEnabled(true);
    web.loadUrl(bundle.getString("url"));
    web.setWebViewClient(new MyWebViewClient());


    Button btn_back = (Button)findViewById(R.id.btn_back_bizrate);
    btn_back.setOnClickListener(new View.OnClickListener() {

      public void onClick(View arg0) {
        finish();   
      }
    });

    Button btn_globe = (Button)findViewById(R.id.btn_store_globe);
    btn_globe.setOnClickListener(new View.OnClickListener() {

      public void onClick(View arg0) {
        Intent browserIntent =  new Intent("android.intent.action.VIEW",
          Uri.parse(ProductComparisonActivity.store_url));
        startActivity(browserIntent);

      }
    });
  }


public class MyWebViewClient extends WebViewClient {
  @Override
  public boolean shouldOverrideUrlLoading(WebView view, String url) {
    view.loadUrl(url);
    return true;
  }

  @Override
  public void onPageFinished(WebView view, String url) {
    dialog.dismiss();
  }

  @Override
  public void onPageStarted(WebView view, String url, Bitmap favicon) {
    dialog.show();
  }
}

}

XML:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="fill_parent" android:layout_width="fill_parent"
    android:orientation="vertical">
    <LinearLayout android:layout_height="wrap_content"
        android:id="@+id/linearLayout1" android:layout_width="match_parent"
        android:background="@drawable/top_bar_bg">
        <Button android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:background="@drawable/back_to_btn"
            android:id="@+id/btn_back_bizrate" android:layout_gravity="center"
            android:layout_marginLeft="10dip"></Button>
        <TextView android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:id="@+id/text"
            android:text="Store Name" android:textColor="#ffffff"
            android:textSize="20dip" android:textStyle="bold"
            android:layout_marginLeft="12dip" android:layout_gravity="center"></TextView>
    </LinearLayout>
    <LinearLayout android:id="@+id/linearLayout2"
        android:layout_width="fill_parent" android:layout_height="350dip">
        <WebView android:layout_height="fill_parent"
            android:layout_width="fill_parent" android:id="@+id/web_storesite"></WebView>
    </LinearLayout>
    <LinearLayout android:layout_height="wrap_content"
        android:id="@+id/linearLayout3" android:layout_width="match_parent"
        android:background="@drawable/tab_bar_bg">
        <Button android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:background="@drawable/prev_icon"
            android:id="@+id/btn_store_prev" android:layout_marginLeft="60dip"
            android:layout_gravity="center"></Button>
        <Button android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:id="@+id/btn_store_next"
            android:background="@drawable/next_icon" android:layout_marginLeft="40dip"
            android:layout_gravity="center"></Button>
        <Button android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:background="@drawable/globe_icon"
            android:id="@+id/btn_store_globe" android:layout_marginLeft="80dip"
            android:layout_gravity="center"></Button>
    </LinearLayout>
</LinearLayout>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:33:40+00:00Added an answer on May 22, 2026 at 10:33 pm

    ComponentInfo{com.shopzilla.android.common/com.shopzilla.android.product.ProductStoreActivity} : ,tells that ProductStoreActivity is not detected, check in AndroidManifest file , whether you have specified the activity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get a URL from a user. I need to know: a) is the
I want call a url and get the response data from the url from
If I get a NullPointerException in a call like this: someObject.getSomething().getSomethingElse(). getAnotherThing().getYetAnotherObject().getValue(); I get
It doesn't seem to be working right now. I get a java.lang.NullPointerException I have
We get a large amount of data from our clients in pdf files in
I'm new to android... having trouble trying to open a URL from a live
i get NullPointerException at the start of the for where am i going wrong?
Here goes a command object which needs to be populated from a Spring form
I am trying get content from the link https://....com:8455 where Server's certificate is not
I get a very common crash below from the code below. I thought my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.