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 8391169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:11:20+00:00 2026-06-09T19:11:20+00:00

I really don’t know what to do anymore… I got this code (tried many

  • 0

I really don’t know what to do anymore…

I got this code (tried many before):

final LoaderImageView image = (LoaderImageView) findViewById(R.id.loaderImageView);
        image.setImageDrawable(getAnImageUrl());  *<--- is line 119, where logcat say the NullPointer is*emphasized text*

private String getAnImageUrl() {
        return "http://i.imgur.com/n6jBV.jpg";
    }

This should show an image, I also tried many other ways I found on the internet, But it always says:

08-15 12:37:57.770: E/AndroidRuntime(19455): FATAL EXCEPTION: main
08-15 12:37:57.770: E/AndroidRuntime(19455): java.lang.RuntimeException: Unable to start activity 

ComponentInfo{com.dlv.listactivity/com.dlv.listactivity.MainActivity}: java.lang.NullPointerException
08-15 12:37:57.770: E/AndroidRuntime(19455):    at android.app.ActivityThread.performLaunchActivity

(ActivityThread.java:1651)
08-15 12:37:57.770: E/AndroidRuntime(19455):    at android.app.ActivityThread.handleLaunchActivity

(ActivityThread.java:1667)
08-15 12:37:57.770: E/AndroidRuntime(19455):    at android.app.ActivityThread.access$1500

(ActivityThread.java:117)
08-15 12:37:57.770: E/AndroidRuntime(19455):    at android.app.ActivityThread$H.handleMessage

(ActivityThread.java:935)
08-15 12:37:57.770: E/AndroidRuntime(19455):    at android.os.Handler.dispatchMessage(Handler.java:99)
08-15 12:37:57.770: E/AndroidRuntime(19455):    at android.os.Looper.loop(Looper.java:123)
08-15 12:37:57.770: E/AndroidRuntime(19455):    at android.app.ActivityThread.main

(ActivityThread.java:3691)
08-15 12:37:57.770: E/AndroidRuntime(19455):    at java.lang.reflect.Method.invokeNative(Native 

Method)
08-15 12:37:57.770: E/AndroidRuntime(19455):    at java.lang.reflect.Method.invoke(Method.java:507)
08-15 12:37:57.770: E/AndroidRuntime(19455):    at com.android.internal.os.ZygoteInit

$MethodAndArgsCaller.run(ZygoteInit.java:847)
08-15 12:37:57.770: E/AndroidRuntime(19455):    at com.android.internal.os.ZygoteInit.main

(ZygoteInit.java:605)
08-15 12:37:57.770: E/AndroidRuntime(19455):    at dalvik.system.NativeStart.main(Native Method)
08-15 12:37:57.770: E/AndroidRuntime(19455): Caused by: java.lang.NullPointerException
08-15 12:37:57.770: E/AndroidRuntime(19455):    at com.dlv.listactivity.MainActivity.onCreate

(MainActivity.java:119)
08-15 12:37:57.770: E/AndroidRuntime(19455):    at android.app.Instrumentation.callActivityOnCreate

(Instrumentation.java:1047)
08-15 12:37:57.770: E/AndroidRuntime(19455):    at android.app.ActivityThread.performLaunchActivity

(ActivityThread.java:1615)

About that he gets a NullPointer.
I also already give permission to the internet (Tried every single one of them I found on the internet by now):

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> 
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.DELETE_CACHE_FILES">

And this is my list.xml:

<?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="wrap_content">
  <com.dlv.listactivity.LoaderImageView
        android:id="@+id/loaderImageView"
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content"/>
      <!--  image="http://developer.android.com/images/dialog_buttons.png" -->

  <ImageView
      android:id="@+id/img"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:src="@drawable/ic_launcher" />

  <TextView
      android:id="@+id/title"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_weight="1" android:layout_gravity="left|center_vertical" android:textSize="20dip" android:layout_marginLeft="10dip"/>
</LinearLayout>

I use a listActivity (instead of the normal Activity), and I got 2 xml’s that I combine with inflate.

I even got other projects where I can download/show picture from the internet… But this one doesn’t and I can’t find the problem…

Can the inflate be a problem? or something else?
Please give me some suggestions.

Thanks Already, Bigflow

  • 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-06-09T19:11:22+00:00Added an answer on June 9, 2026 at 7:11 pm

    Your layout doesn’t have a LoaderImageView with the ID R.id.loaderImageView.
    That’s why it’s Null.

    I believe you’re using this: http://blog.blundell-apps.com/imageview-with-loading-spinner/
    but forgot to declare it on the layout:

     <com.blundell.tut.LoaderImageView
       android:id="@+id/loaderImageView"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I really don't know how to do this. I tried: #menu-right div { position:
I really don't know squat about java memory management, so this is entirely my
I really don't know how to title this question, but I need some help
I have this json object (which i don't really know what is inside) and
I have this problem and really don't know how to solve this. I'm having
I really don't know how to express this question. But what I'm trying to
I really don't know how to say, may be this is why I didn't
This is one of things that I really don't get. I know that it's
I use this code to get Server Date but I really don't understand.CreateDateTime() is
Not really sure how to ask this question because I really don't know what

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.