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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:28:57+00:00 2026-06-11T00:28:57+00:00

In the code below I keep getting a null exception error and have tested

  • 0

In the code below I keep getting a null exception error and have tested to the point to know its coming from the line of code ‘startup_logo.setBackgroundResource(R.anim.startup)’ and more specifically ‘setBackgroundResource.’ I am not sure why this could be happening, could anyone please helpout? Thanks.

    protected static AnimationDrawable temp, startup_move, menu_start, featuredpanel_start, collection_start, recommend_start, top_start, random_start;

    protected static void startup() {

        for (int i = 0; true;) {
            Log.d(i + "", "Content");
            if (i == 0) {
                startup_logo.setBackgroundResource(R.anim.startup);
                temp = (AnimationDrawable) startup_logo.getBackground();

                fadeout.start();
            }
            else if (i == 1) {
                featuredpanel.setBackgroundResource(R.anim.featured_move);
                temp = (AnimationDrawable) featuredpanel.getBackground();

                menu.setAnimation(fadein);
                logo.setAnimation(fadein);

                fadein.start();
            }
            else if (!temp.isRunning()) {
                temp.start();
                i++;
            }
        }
    }
}

Another section of code defines startup_logo as follows:

startup_logo = (LinearLayout) findViewById (R.anim.startup);

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/startup"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:background="@anim/startup" >

TRACEBACK:

09-08 01:02:31.239: E/AndroidRuntime(1105): FATAL EXCEPTION: main
09-08 01:02:31.239: E/AndroidRuntime(1105): java.lang.RuntimeException: Unable to start activity ComponentInfo{My.Taste.App/My.Taste.App.MyTasteActivity}: java.lang.NullPointerException
09-08 01:02:31.239: E/AndroidRuntime(1105):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at android.app.ActivityThread.access$600(ActivityThread.java:123)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at android.os.Handler.dispatchMessage(Handler.java:99)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at android.os.Looper.loop(Looper.java:137)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at android.app.ActivityThread.main(ActivityThread.java:4424)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at java.lang.reflect.Method.invokeNative(Native Method)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at java.lang.reflect.Method.invoke(Method.java:511)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at dalvik.system.NativeStart.main(Native Method)
09-08 01:02:31.239: E/AndroidRuntime(1105): Caused by: java.lang.NullPointerException
09-08 01:02:31.239: E/AndroidRuntime(1105):     at My.Taste.App.TBGStartAnimations.startup(TBGStartAnimations.java:18)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at My.Taste.App.MyTasteActivity.onCreate(MyTasteActivity.java:68)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at android.app.Activity.performCreate(Activity.java:4465)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
09-08 01:02:31.239: E/AndroidRuntime(1105):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
09-08 01:02:31.239: E/AndroidRuntime(1105):     ... 11 more
  • 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-11T00:28:59+00:00Added an answer on June 11, 2026 at 12:28 am

    I figured it out!

    startup_logo = (LinearLayout) findViewById (R.anim.startup);
    

    Shouldve searched by R.id not R.anim

    startup_logo = (LinearLayout) findViewById (R.id.startup);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I keep getting this error from the below code, was wondering if anyone
How can I correct the problem I keep getting from the code below which
I keep keep getting the above error when I run the code below. All
I keep getting this warning with the line of code below, 'initWithFrame:reuseIdentifier:' is deprecated.
The code below fails on the line: Class.forName(oracle.jdbc.driver.OracleDriver); with the error: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver The
gcc 4.4.4 c89 I am using the code below. However, I keep getting the
I keep getting a 'System.OutOfMemoryException' thrown at the code below. I can't figure out
Using the code below, I want to keep the same menu div opened in
Code below is working well as long as I have class ClassSameAssembly in same
Code below is used to save PostgreSql database backup from browser in Apache Mono

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.