splash screen error

Put your problem here if it does not fit any of the other categories.

splash screen error

Postby neel » Mon Feb 25, 2008 6:58 am

hello plus minus.......i get the following error message in the console of eclipse for the splash screen example.
i am using version m5 of android sdk and java 1.6

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. [2008-02-24 21:42:20 - Splash] WARNING: Package com.neel is already registered by /data/app/Hello.apk
  2.  
  3. [2008-02-24 21:42:20 - Splash] ActivityManager: Error type 3
  4.  
  5. [2008-02-24 21:42:20 - Splash] ActivityManager: Error: Activity class {com.neel/com.neel.Splash} does not exist.
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


my Splash.java file is
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. package com.neel;
  2.  
  3.  
  4.  
  5. import android.app.Activity;
  6.  
  7. import android.os.Bundle;
  8.  
  9. import android.os.Handler;
  10.  
  11. import android.os.Message;
  12.  
  13. import android.view.View;
  14.  
  15. import android.widget.ImageView;
  16.  
  17.  
  18.  
  19. public class Splash extends Activity {
  20.  
  21.      
  22.  
  23.      private static final int STOPSPLASH = 0;
  24.  
  25.      //time in milliseconds
  26.  
  27.      private static final long SPLASHTIME = 3000;
  28.  
  29.      
  30.  
  31.      private ImageView splash;
  32.  
  33.      
  34.  
  35.      //handler for splash screen
  36.  
  37.      private Handler splashHandler = new Handler() {
  38.  
  39.           /* (non-Javadoc)
  40.  
  41.            * @see android.os.Handler#handleMessage(android.os.Message)
  42.  
  43.            */
  44.  
  45.           @Override
  46.  
  47.           public void handleMessage(Message msg) {
  48.  
  49.                switch (msg.what) {
  50.  
  51.                case STOPSPLASH:
  52.  
  53.                     //remove SplashScreen from view
  54.  
  55.                     splash.setVisibility(View.GONE);
  56.  
  57.                     break;
  58.  
  59.                }
  60.  
  61.                super.handleMessage(msg);
  62.  
  63.           }
  64.  
  65.      };
  66.  
  67.      
  68.  
  69.     /** Called when the activity is first created. */
  70.  
  71.     @Override
  72.  
  73.     public void onCreate(Bundle icicle) {
  74.  
  75.         super.onCreate(icicle);
  76.  
  77.         setContentView(R.layout.main);
  78.  
  79.                splash = (ImageView) findViewById(R.id.splashscreen);
  80.  
  81.                Message msg = new Message();
  82.  
  83.                msg.what = STOPSPLASH;
  84.  
  85.                splashHandler.sendMessageDelayed(msg, SPLASHTIME);
  86.  
  87.     }
  88.  
  89. }
Parsed in 0.037 seconds, using GeSHi 1.0.8.4


and my androidmanifest.xml file is
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  4.  
  5.    package="com.neel">
  6.  
  7.     <application android:icon="@drawable/icon">
  8.  
  9.         <activity android:name=".Splash" android:label="@string/app_name">
  10.  
  11.             <intent-filter>
  12.  
  13.                 <action android:name="android.intent.action.MAIN" />
  14.  
  15.                 <category android:name="android.intent.category.LAUNCHER" />
  16.  
  17.             </intent-filter>
  18.  
  19.         </activity>
  20.  
  21.        
  22.  
  23.     </application>
  24.  
  25. </manifest>
Parsed in 0.003 seconds, using GeSHi 1.0.8.4


and my main.xml file is
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  4.  
  5.     android:orientation="vertical" android:layout_width="fill_parent"
  6.  
  7.     android:layout_height="fill_parent">
  8.  
  9.      <ImageView android:id="@+id/splashscreen" android:layout_width="wrap_content"
  10.  
  11.          android:layout_height="fill_parent" android:src="@drawable/test"
  12.  
  13.          android:layout_gravity="center"/>
  14.  
  15.      <TextView android:layout_width="fill_parent"
  16.  
  17.          android:layout_height="wrap_content" android:text="Hello World, splash"/>
  18.  
  19. </LinearLayout>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4


thanks for all ur help
neel
Developer
Developer
 
Posts: 31
Joined: Fri Feb 15, 2008 5:09 am
Location: San Jose

Top

Postby plusminus » Mon Feb 25, 2008 9:34 am

Hello neel,

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. [2008-02-24 21:42:20 - Splash] WARNING: Package com.neel is already registered by /data/app/Hello.apk
Parsed in 0.035 seconds, using GeSHi 1.0.8.4

Maybe there already is another Application conflicting with this new one. Try running your project with "-wipe-data" to reset the emulator.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby neel » Mon Feb 25, 2008 9:40 am

hi plus minus

the code is working now. I just changed the package structure
for Hello World program it was com.neel

and for the splash screen example I put it in com.neel.splash and it works :D


i guess it does not take two programs in the same package

earlier i had the splashscreen example also in the com.neel package


but thanks for ur help a always......really appreciate it brother :)
neel
Developer
Developer
 
Posts: 31
Joined: Fri Feb 15, 2008 5:09 am
Location: San Jose

Postby plusminus » Mon Feb 25, 2008 9:48 am

:)
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 24 guests