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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:31:36+00:00 2026-05-22T20:31:36+00:00

Okay, I know that I’ve not been the best at accept rate…and I will

  • 0

Okay, I know that I’ve not been the best at accept rate…and I will make up for that…that being said.

I have followed a TON of Splash Screen tutorials and THOUGHT that I had something that would work…however, the sound won’t work…and whenever I finish I get the error “cannot be resolved or is not a field”

Any suggestions: here is the COMPLETE SplashScreen.java code:

 package com.droidnova.android;

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


 public class SplashScreen extends Activity {
protected boolean _active = true;
protected int _splashTime = 5000;

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

    MediaPlayer mpSplash = MediaPlayer.create(this, R.raw.laugh);
    mpSplash.start();

    // thread for displaying the SplashScreen
    Thread splashTread = new Thread() {
        @Override
        public void run() {
            try {
                int waited = 0;
                while(_active && (waited < _splashTime)) {
                    sleep(100);
                    if(_active) {
                        waited += 100;
                    }
                }
            } catch(InterruptedException e) {
                // do nothing
            } finally {
                finish();
                startActivity(new Intent("com.droidnova.android.splashscreen.MyApp"));
                stop();
            }
        }
    };
    splashTread.start();
}

@Override
public boolean onTouchEvent(MotionEvent event) {
    if (event.getAction() == MotionEvent.ACTION_DOWN) {
        _active = false;
    }
    return true;
     }
}

Any suggestions?

UPDATE!

Here’s the code for the AndroidManifest.xml film:

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.droidnova.android"
  android:versionCode="1"
  android:versionName="1.0">
 <application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".SplashScreen"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".MyApp">
        <intent-filter>
            <action android:name="com.droidnova.android.splashscreen.MyApp" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
 </application>
 <uses-sdk android:minSdkVersion="4" />
 </manifest>

There is an error on lines 5 and 6:
Line 5: error: Error: No resource found that matches the given name (at 'label' with value '@string/ app_name').
Line 6: error: Error: No resource found that matches the given name (at 'label' with value '@string/ app_name').

Added R.java:

 /* AUTO-GENERATED FILE.  DO NOT MODIFY.
  *
  * This class was automatically generated by the
  * aapt tool from the resource data it found.  It
  * should not be modified by hand.
  */

 package com.droidnova.android;

 public final class R {
     public static final class attr {
}
public static final class drawable {
    public static final int icon=0x7f020000;
}
public static final class id {
    public static final int textView1=0x7f050000;
}
public static final class layout {
    public static final int main=0x7f030000;
    public static final int splash=0x7f030001;
}
public static final class string {
    public static final int app_name=0x7f040000;
    public static final int main_screen=0x7f040001;
    public static final int splash_screen=0x7f040002;
}
}
  • 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-22T20:31:37+00:00Added an answer on May 22, 2026 at 8:31 pm

    Try removing import android.R;.

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

Sidebar

Related Questions

Okay, I know that 1) this is probably not possible with CSS alone and
Okay, here's my short question: I know that === and !== operators will compare
I know that using scriptlets are considered taboo nowadays. Its okay and I will
Most of us know that a loop should not have a non-terminating condition. For
Okay...I'm really getting a bit frustrated with this. I know that this post will
Yes, I know that my problem is not the unique, but I have analysed
I have an application that I'm trying to make multithreaded. Each thread will access
I know that there have been many similar questions on this topic but none
Okay, so I know that using eval() isn't great, but I haven't been able
Okay, next PHPExcel question. I have an HTML form that users fill out and

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.