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

  • Home
  • SEARCH
  • 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 6202607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:45:58+00:00 2026-05-24T04:45:58+00:00

07-30 21:02:39.260: ERROR/AndroidRuntime(7961): java.lang.NullPointerException 07-30 21:02:39.260: ERROR/AndroidRuntime(7961): at com.fttech.gameIT.shoppingClass$1.onClick(shoppingClass.java:45) 07-30 21:02:39.260: ERROR/AndroidRuntime(7961): at android.view.View.performClick(View.java:3110)

  • 0
07-30 21:02:39.260: ERROR/AndroidRuntime(7961): java.lang.NullPointerException
07-30 21:02:39.260: ERROR/AndroidRuntime(7961):     at com.fttech.gameIT.shoppingClass$1.onClick(shoppingClass.java:45)
 07-30 21:02:39.260: ERROR/AndroidRuntime(7961):     at android.view.View.performClick(View.java:3110)
 07-30 21:02:39.260: ERROR/AndroidRuntime(7961):     at android.view.View$PerformClick.run(View.java:11928)
 07-30 21:02:39.260: ERROR/AndroidRuntime(7961):     at android.os.Handler.handleCallback(Handler.java:587)

That is the code i get at this line when launching another class extends Fragment{

EDIT: Added initializaion

        shopping_details_fragment shopping;

@Override
public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.shopping);

    findIT = (Button)findViewById(R.id.findIT);
    shop = (EditText)findViewById(R.id.item);
    type = (RadioGroup)findViewById(R.id.console);
    site = (RadioGroup)findViewById(R.id.shopping_group);
    shopping = new shopping_details_fragment();

    final Intent d = new Intent(this, shopping_details_fragment.class);
    findIT.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            getUserPreference();
            shopping.loadUrl(url);// line 45
            startActivity(d);


        }

Here is the activitiy i am trying to launch

public class shopping_details_fragment extends Fragment{

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){

    //Return the view for our WebView
    return(inflater.inflate(R.id.browserFrag,container, false));

}

public void loadUrl(String url){
    ((WebView)getView().findViewById(R.id.browser)).loadUrl(url);
}

}

EDIT 2:It now gives me a error at

((WebView)getView().findViewById(R.id.browser)).loadUrl(url);

Here is the error

 07-30 22:34:42.820: ERROR/AndroidRuntime(9785): java.lang.NullPointerException
 07-30 22:34:42.820: ERROR/AndroidRuntime(9785):     at com.fttech.gameIT.shopping_details_fragment.loadUrl(shopping_details_fragment.java:21)
07-30 22:34:42.820: ERROR/AndroidRuntime(9785):     at com.fttech.gameIT.shoppingClass$1.onClick(shoppingClass.java:50)
07-30 22:34:42.820: ERROR/AndroidRuntime(9785):     at android.view.View.performClick(View.java:3110)
07-30 22:34:42.820: ERROR/AndroidRuntime(9785):     at android.view.View$PerformClick.run(View.java:11928)
07-30 22:34:42.820: ERROR/AndroidRuntime(9785):     at android.os.Handler.handleCallback(Handler.java:587)

EDIT 3: detials_fragment.xml This xml is holding the WebView with id browser…

<?xml version="1.0" encoding="utf-8"?>
<WebView
xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="match_parent"
 android:id="@+id/browser"
 android:layout_height="match_parent">
</WebView>

HERE IS shopping XML holding the fragment browserFrag

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
 android:layout_height="fill_parent"

>
<LinearLayout

android:name="com.fttech"
android:orientation="vertical"
android:layout_width="525dp" android:layout_height="match_parent" android:weightSum="1">

  <LinearLayout android:layout_height="wrap_content" android:id="@+id/linearLayout1" android:layout_width="match_parent" android:orientation="vertical">
    <Button android:text="Find IT!" android:id="@+id/findIT" android:layout_width="fill_parent" android:layout_height="wrap_content"></Button>
   </LinearLayout>
   <EditText android:layout_height="wrap_content" android:layout_width="match_parent" android:id="@+id/item"></EditText>
   <TextView android:text="Pick Your Shopping Site" android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="21dip"> </TextView>

  </LinearLayout>

<fragment android:layout_height="match_parent" android:id="@+id/browserFrag" android:name="com.fttech.gameIT.shopping_details_fragment" android:layout_width="match_parent">  </fragment>

 </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-24T04:45:59+00:00Added an answer on May 24, 2026 at 4:45 am

    I’m going to make a wild assumption that line 45 of shoppingClass.java is:

    shopping.loadUrl(url);
    

    I’m also going to guess that shopping is not being properly initialized.

    EDIT: What is the behavior if you replace the above line with:

    if (shopping == null) {
        Toast.makeText(this, "shopping==null!", Toast.LENGTH_SHORT).show();
    } else {
        shopping.loadUrl(url);
    }
    

    If you get the toast message, then perhaps you are assigning null to shopping somewhere else in your code. Your debugger can help if you put a write watch on shopping.

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

Sidebar

Related Questions

Server: jboss-5.1.0 Java Version: jdk1.6.0_14 Deployment Method: ant v1.7 Error: 08:40:04,260 WARN [ZipEntryContext] IGNORING:
I'm having this error in eclipes java.lang.UnsupportedClassVersionError: Bad version number in .class file .
Does anyone have a method to overcome the 260 character limit of the MSBuild
if (cell == nil) { //cell = [[[UITableViewCell alloc] initWithFrame:CGRectMake(0, 0, 260, 44) reuseIdentifier:CellIdentifier]
i am getting this error on the last line here: <path d=M 909.99146,226.40625 L
I randomly see the same error in the catalina.out log: WARNING: SQL Error: 0,
I deployed my application to the official server and started getting this error: Stacktrace:
I got the following error: > org.apache.jasper.JasperException: An > exception occurred processing JSP page
I have inherited some code and am getting an error when I try to
I'm getting the following error when trying to build my app using Team Foundation

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.