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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:35:16+00:00 2026-06-05T10:35:16+00:00

I have made my application using android SDK 2.2 version and now when I

  • 0

I have made my application using android SDK 2.2 version and now when I am running my app on android SDK 4.0.3 it’s not running.

I have given the min and the max sdk in the manifest file.

I am new in android and want to run my app for the lower and higher versions both. Can anybody tell me how can I do this. Any help is appreciated.

Code for splash class

package com.Cricket_trivia.in;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.MotionEvent;

public class SplashScreen extends Activity {

    protected int _splashTime = 5000; 

    private Thread splashTread;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);


        final SplashScreen sPlashScreen = this; 

        // thread for displaying the SplashScreen
        splashTread = new Thread() {
            @Override
            public void run() {
                try {                   
                    synchronized(this){
                        wait(_splashTime);
                    }

                } catch(InterruptedException e) {} 
                finally {
                    finish();

                    Intent i = new Intent();
                    i.setClass(sPlashScreen, K_trivia_cricketActivity.class);
                    startActivity(i);

                    stop();
                }
            }
        };

        splashTread.start();
    }
    @Override
    public boolean onTouchEvent(MotionEvent event) {
        if (event.getAction() == MotionEvent.ACTION_DOWN) {
            synchronized(splashTread){
                splashTread.notifyAll();
            }
        }
        return true;
    }

}

EDIT: My logcat

    06-07 10:24:18.710: I/dalvikvm(1461): threadid=3: reacting to signal 3
    06-07 10:24:18.760: I/dalvikvm(1461): Wrote stack traces to '/data/anr/traces.txt'
    06-07 10:24:18.890: D/dalvikvm(1461): GC_FOR_ALLOC freed 45K, 4% free 6541K/6787K, paused 74ms
    06-07 10:24:18.900: I/dalvikvm-heap(1461): Grow heap (frag case) to 7.333MB for 921616-byte allocation
    06-07 10:24:19.010: I/dalvikvm(1461): threadid=3: reacting to signal 3
    06-07 10:24:19.100: I/dalvikvm(1461): Wrote stack traces to '/data/anr/traces.txt'
    06-07 10:24:19.140: D/dalvikvm(1461): GC_CONCURRENT freed <1K, 5% free 7440K/7751K, paused 5ms+5ms
    06-07 10:24:19.240: D/dalvikvm(1461): GC_FOR_ALLOC freed 0K, 5% free 7440K/7751K, paused 97ms
    06-07 10:24:19.240: I/dalvikvm-heap(1461): Grow heap (frag case) to 7.723MB for 409936-byte allocation
    06-07 10:24:19.320: D/dalvikvm(1461): GC_FOR_ALLOC freed 0K, 5% free 7841K/8199K, paused 61ms
    06-07 10:24:19.589: D/gralloc_goldfish(1461): Emulator without GPU emulation detected.
    06-07 10:24:19.669: I/dalvikvm(1461): threadid=3: reacting to signal 3
    06-07 10:24:19.779: I/dalvikvm(1461): Wrote stack traces to '/data/anr/traces.txt'
    06-07 10:24:24.600: W/dalvikvm(1461): threadid=11: thread exiting with uncaught exception (group=0x409c01f8)
    06-07 10:24:24.600: E/AndroidRuntime(1461): FATAL EXCEPTION: Thread-78
    06-07 10:24:24.600: E/AndroidRuntime(1461): java.lang.UnsupportedOperationException
    06-07 10:24:24.600: E/AndroidRuntime(1461):     at java.lang.Thread.stop(Thread.java:1076)
    06-07 10:24:24.600: E/AndroidRuntime(1461):     at java.lang.Thread.stop(Thread.java:1063)
    06-07 10:24:24.600: E/AndroidRuntime(1461):     at com.Cricket_trivia.in.SplashScreen$1.run(SplashScreen.java:40)
    06-07 10:24:26.209: D/dalvikvm(1461): GC_FOR_ALLOC freed 1037K, 15% free 7022K/8199K, paused 62ms
    06-07 10:24:26.209: I/dalvikvm-heap(1461): Grow heap (frag case) to 7.509MB for 614416-byte allocation
    06-07 10:24:26.440: D/dalvikvm(1461): GC_CONCURRENT freed <1K, 8% free 7621K/8199K, paused 4ms+5ms
    06-07 10:24:26.610: I/dalvikvm(1461): threadid=3: reacting to signal 3
    06-07 10:24:26.640: I/dalvikvm(1461): Wrote stack traces to '/data/anr/traces.txt'
  • 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-05T10:35:17+00:00Added an answer on June 5, 2026 at 10:35 am

    The reason why your app is crashing on 4.0.3 but not 2.2 is most likely because you are performing an expensive operation on the UI thread. Blocking the UI thread is very bad practice… don’t do it!! Previous versions of Android (i.e. pre-ICS versions) didn’t care when you did this and let your app run as is. In 4.0 and above, however, the OS checks against this and crashes your app if you ever perform a potentially expensive operation on the UI thread (such as a network connection, etc.).

    You have provided basically no information on what the problem is in your question, so that’s all I can really do to help you out.


    Edit:

    Does something like this work?

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
    }
    
    @Override
    public boolean onTouchEvent(MotionEvent event) {
        if (event.getAction() == MotionEvent.ACTION_DOWN) {
            Intent i = new Intent();
            i.setClass(sPlashScreen, K_trivia_cricketActivity.class);
            startActivity(i);
        }
        return true;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made an application using Java/Hibernate/MySQL, but whenever I try running it, it
I have created a Android application using Google Maps. Now I want to check
I made an application that is using Android SDK 2.1. This application uses bluetooth
I am using the official Facebook SDK for Android in my app. I have
Now, I have a web application made using [html, asp.net, sql server,javascript & ajax].
I have made a full application in JQM using cakePHP as the server side
I have made an application (for my self) for feeds reading, using SyndicationFeed ,
I have an application made by using phonegap 1.5.0 and jquery mobile 1.1.0.... I
I have made an application which uses latest ios facebook sdk to connect. I
i have made an android application for Project Build Target as Target name:: Android

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.