MAKE SURE your Splash.java is in your main src package (com.thenewboston.travis, or whatever). You can either do this by typing ---> package com.thenewboston.travis; in your Splash.java file OR just drag and drop it from (default) into the com.thenewboston.travis in your src folder.
@yoyos41 Inside your Android Manifest, double check that the "android:name" attribute and make sure it is spelled exactly the same as the Java class file (in my case android:name=".Splash"). Also make sure the period before the name.
@TheJennetteFan thank for the answer my friend but my problem is not in the switch statement, it is on the code that "makes the splash screen appear! I fully understand the xml part, and the new class named "Splash" part, but since the error is talking about "code migration", i don't seem to understand what to change (noob here :P). In the given code, what should be changed to make the Splash Screen appear?
The original code of the class is: public class Splash extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); super.setIntegerProperty(R.drawable.ic_launcher); };
}
What the heck needs to be changed regarding the methods and the switch statement in order to make the Splash Screen work??
I've been busting my head over this problem for the last 4 days!!!
Ok, fixed the splash.xml is out of sync error. Had a typo somewhere. Now I've gotta figure out another problem. The program keeps crashing on my tablet. Going through the log to see what happened.
@TheJennetteFan Actually I'm developing using 2.2. Now I'm getting an error: splash.xml is out of sync. Please refresh. I've already redone the splash.xml twice.
@TheJennetteFan can you give us an example (c/p of the code preferably if it ain't too much trouble), how is it gonna be fixed using the switch loop? Thanks in advance mate! :D
Ugh, nvm guys, its because Android saves the state of the application when you go back to the home screen.
If anyone else has this problem, go to Settings>Applications>Running Applications, then to your app, then "Force Kill". When you execute it again, it should start from the splash.
@timedstroyer No idea... But, if you plug your phone in, and it runs the same android platform that you're developing for, for example I'm developing for Gingerbread (2.3.3) and that's what my phone runs, then when you run the application, you can actually select your phone from the list that should pop up, and you can test it on your phone. It's much faster.
@david3165 i did what you told me, my splash screen is working fine (My image came up) but the counter app that we made is not running....anything wrong with this? (no errors in eclipse)
@TheConsole2011 window -> Preferences -> search for text and there is a little box to the right that says "Show line numbers" PM if u have any questions.
The splash screen came up, but I got this message, "ActivityManager: Warning: Activity not started, its current task has been brought to the front" I'm confused because it worked anyways.. :D
@sweet2smart After the Home Screen loads all the way (unlock and volume icons appear) click the MENU button located in the right side window pane and the new splash screen should load. This of course assumes that you have no errors displayed in the Eclipse Package Explorer window pane. Always make sure that the .java file is selected when you press the Run button and not an .xml file because that will attempt to run the xml file rather than the java class files (main.output.xml errors display)
@david3165 OMG....such a small thing and I spent the whole day scratching my head ...Thank you so much for solving the problem.......I was so happy to finally see my .png image on emu* ...Thanks a lot once again !! :D
18:33:33,251 INFO [main] Main - javax.xml.transform.TransformerFactory=null
18:33:33,253 INFO [main] Main - java.endorsed.dirs=C:\Program Files\Java\jre6\lib\endorsed
18:33:33,258 INFO [main] Main - launchFile: C:\Users\gera\Desktop\digitalexpansions\.metadata\.plugins\org.eclipse.wst.xsl.jaxp.launching\launch\launch.xml
You can subscribe to this playlist. Click on "Android Application Development Tutorials (thenewboston)" playlist link under my comment. Thumbs up to help others!
what's up my gangstas. lol. easy to understand tutorial.
viciousstrifeay 2 weeks ago in playlist Android Application Development Tutorials
For anyone having the force close problem:
MAKE SURE your Splash.java is in your main src package (com.thenewboston.travis, or whatever). You can either do this by typing ---> package com.thenewboston.travis; in your Splash.java file OR just drag and drop it from (default) into the com.thenewboston.travis in your src folder.
lmommaerts 2 weeks ago
lol "Wassup my gangstas" hilarious
moonsoonmenu 3 weeks ago
whatsupp my gangsta XD
kurumaw 1 month ago
I love studying many subjects art to science are all useful skills and the world would be better if more understood this.
ownage554 1 month ago
Could not find The New Boston.apk!
What should i Do? Without the Splash it works fine..
kiksony 2 months ago
What's up my ganstas?
melvinmarte 2 months ago 2
I get a force close upon running my program. Eclipse does not show any bugs. Does anyone know how to solve this?
djmaxxl 2 months ago
Whenever I try and the it I get force Close? Any Help? Checked my code for 4 days. And pored it on forum but no one replied
yoyos41 2 months ago
@yoyos41 Inside your Android Manifest, double check that the "android:name" attribute and make sure it is spelled exactly the same as the Java class file (in my case android:name=".Splash"). Also make sure the period before the name.
stri8ted 2 months ago
I find the android manifest file a bit intimidating
xteric1 2 months ago in playlist Android Application Development Tutorials
Here is a switch loop examle mate switch (expression) {
case cond1: code_block_1;
case cond2: code_block_2;
...
case condn: code_block_n;
default: code_block_default;
}
Just fill the blanks then eclipse will swithc it to if statement for you
TheJennetteFan 2 months ago
@TheJennetteFan thank for the answer my friend but my problem is not in the switch statement, it is on the code that "makes the splash screen appear! I fully understand the xml part, and the new class named "Splash" part, but since the error is talking about "code migration", i don't seem to understand what to change (noob here :P). In the given code, what should be changed to make the Splash Screen appear?
MaFiOzOs88 2 months ago in playlist Android Development thenewboston
The original code of the class is: public class Splash extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); super.setIntegerProperty(R.drawable.ic_launcher); };
}
What the heck needs to be changed regarding the methods and the switch statement in order to make the Splash Screen work??
I've been busting my head over this problem for the last 4 days!!!
Mayday Mayday! :P
MaFiOzOs88 2 months ago in playlist Android Development thenewboston
@MaFiOzOs88 The easiest fix is to change the api level (android version ) to 2.2
TheJennetteFan 2 months ago
@MaFiOzOs88 I think it is SetContentView(R.layout.splash) instead of super.setIntegerProperty(R.drawable.ic_launcher);
screwthisite 2 months ago in playlist Android App Development Tutorials (thenewboston)
Ok, fixed the splash.xml is out of sync error. Had a typo somewhere. Now I've gotta figure out another problem. The program keeps crashing on my tablet. Going through the log to see what happened.
tsolorio3001 2 months ago
Does anyone have any idea, how to fix the problem about the splash, @TheJennetteFan is describing? I'm stuck... :S
MaFiOzOs88 2 months ago
This has been flagged as spam show
@MaFiOzOs88 let me explain it firs if you want to develop for 2.3 you must use a swith loop for 2.2 you can use the method shown in this video
TheJennetteFan 2 months ago
splash has been removed from adt14 but you can use swtich statements insted
TheJennetteFan 3 months ago
@TheJennetteFan So I've been trying to fix splash for no reason?? :(
tsolorio3001 2 months ago
@tsolorio3001 let me explain it firs if you want to develop for 2.3 you must use a swith loop for 2.2 you can use the method shown in this video
TheJennetteFan 2 months ago
@TheJennetteFan Actually I'm developing using 2.2. Now I'm getting an error: splash.xml is out of sync. Please refresh. I've already redone the splash.xml twice.
tsolorio3001 2 months ago
@TheJennetteFan I'll try what you suggested. Thanks.
tsolorio3001 2 months ago
@TheJennetteFan can you give us an example (c/p of the code preferably if it ain't too much trouble), how is it gonna be fixed using the switch loop? Thanks in advance mate! :D
MaFiOzOs88 2 months ago in playlist Android Development thenewboston
Im still stuck, can't do this bit all...
92tomallen 3 months ago in playlist TheNewBoston - Android Application Development
This has been flagged as spam show
It wont show the splash category in the splah.xml page. It says Splash can not be resolved or is a field. Any ideas?? Thanks
92tomallen 3 months ago in playlist TheNewBoston - Android Application Development
Lol. And the splash activity is gonna get super depressed if it doesn't get recognised.
HandMekeysYouFuCoSkr 3 months ago
@Myself
Ugh, nvm guys, its because Android saves the state of the application when you go back to the home screen.
If anyone else has this problem, go to Settings>Applications>Running Applications, then to your app, then "Force Kill". When you execute it again, it should start from the splash.
Starclopsotube 3 months ago
I've checked my manifest 100 times and it looks right, but my app still starts from the "Your total is" screen. Any idea what could be wrong?
Starclopsotube 3 months ago
less mouse more CTRL + SPACE ;)
guerrillaspikes 4 months ago
I'm his gangster :DDD
xXLogicalArgumentsXx 4 months ago in playlist android2
why does my emulator take so long to start up??
timedstroyer 4 months ago
@timedstroyer No idea... But, if you plug your phone in, and it runs the same android platform that you're developing for, for example I'm developing for Gingerbread (2.3.3) and that's what my phone runs, then when you run the application, you can actually select your phone from the list that should pop up, and you can test it on your phone. It's much faster.
Whitellama11 4 months ago
@timedstroyer Because it takes a lot to emulate an android phone.
malikb979 3 months ago
for anyone who this error: "splash cannot be resolved or is not a field "
you should resolve by removing the "import android.R;"over the Splash.java
claudiodom27 5 months ago
PLEASE limit your "For the Most Part" statements... OMG you say it so dang much. But thank you for the class
rgordon999 5 months ago 5
You forgot to add a splash screen timeout, otherwise the splash screen doesn't go away! How do we do that?
DemocraWatch 5 months ago
@david3165 i did what you told me, my splash screen is working fine (My image came up) but the counter app that we made is not running....anything wrong with this? (no errors in eclipse)
please help me out!!
MRillskillz1 5 months ago
You say "basically" a lot! Good tutorials tho :)
Slarkepung 5 months ago in playlist TheNewBoston - Android
How do I get line numbers?
TheConsole2011 5 months ago
@TheConsole2011 window -> Preferences -> search for text and there is a little box to the right that says "Show line numbers" PM if u have any questions.
vasterhaninge 5 months ago
@sweet2smart - thanks, I will try later when I am home.
Any idea why this is happening?
TheDanielLee1 6 months ago
Getting a problem where the java won't pick up my 'splash in the setContentView - can anyone help? splash.xml code below
----
package com.dwl285.dan;
import android.R;
import android.app.Activity;
import android.os.Bundle;
public class Splash extends Activity { @Override protected void onCreate(Bundle RandomBundle) { // TODO Auto-generated method stub super.onCreate(RandomBundle); setContentView(R.layout.splash); }
}
TheDanielLee1 6 months ago
@TheDanielLee1 ...make a new Splash.java file...and type the code again ...it should work....I had the same problem....
sweet2smart 6 months ago in playlist TheNewBoston - Android
The splash screen came up, but I got this message, "ActivityManager: Warning: Activity not started, its current task has been brought to the front" I'm confused because it worked anyways.. :D
MomoMaxedOut 6 months ago in playlist TheNewBoston - Android
@MomoMaxedOut i'm having the same problem, did u realize what was the problem??
polifaceticjat 4 months ago
nothing comes as output on my homescreen emulator......just the wallpaper with charging sign...dont know whats wrong........
sweet2smart 6 months ago
@sweet2smart After the Home Screen loads all the way (unlock and volume icons appear) click the MENU button located in the right side window pane and the new splash screen should load. This of course assumes that you have no errors displayed in the Eclipse Package Explorer window pane. Always make sure that the .java file is selected when you press the Run button and not an .xml file because that will attempt to run the xml file rather than the java class files (main.output.xml errors display)
david3165 6 months ago
@david3165 OMG....such a small thing and I spent the whole day scratching my head ...Thank you so much for solving the problem.......I was so happy to finally see my .png image on emu* ...Thanks a lot once again !! :D
sweet2smart 6 months ago
18:33:33,251 INFO [main] Main - javax.xml.transform.TransformerFactory=null
18:33:33,253 INFO [main] Main - java.endorsed.dirs=C:\Program Files\Java\jre6\lib\endorsed
18:33:33,258 INFO [main] Main - launchFile: C:\Users\gera\Desktop\digitalexpansions\.metadata\.plugins\org.eclipse.wst.xsl.jaxp.launching\launch\launch.xml
1
BloodyMagnificent 6 months ago in playlist TheNewBoston - Android
This has been flagged as spam show
You can subscribe to this playlist. Click on "Android Application Development Tutorials (thenewboston)" playlist link under my comment. Thumbs up to help others!
xGrowler 6 months ago in playlist Android Application Development Tutorials (thenewboston)
can you post some source code that would be very helpful to be able to see it easier
pchelper102 6 months ago 2
it did not work for me
AlgebraManlego 6 months ago in playlist Android
:D!
humanmatti 6 months ago
Everyone is the 0th viewer, yay!
Flaminyogurt 6 months ago
Thumbs up if you're the 0th viewer :p
WPGxSpork 6 months ago 14
crap it doesnt't come up when i try to run it, says closed unexpectedly.. anyone knows what can be the problem??
mastermax7777 6 months ago
@mastermax7777 nvm fixed it, just forgot a > in splash.xml o_o
mastermax7777 6 months ago
@mastermax7777 Welcome to programming =D Five hours of "WHY WONT IT WORK!" 2 seconds of "Because I forgot a semi-colon" =P
Pwncakes1966 6 months ago 114
@Pwncakes1966 thats so true!!!
kylemaster38 6 months ago
@Pwncakes1966 Weeellll, if you're missing a semi-colon, the compiler will usually tell you...
NickEnchev 5 months ago
@mastermax7777 youtube is messed up today !!
glassking99 6 months ago
nice
RickyLopezMartinez 6 months ago