So program too was crashing after the splash screen, the way that I fixed it was accidental and doesn't make sense, but I thought I would post it anyway just in case it works for others:
I was having the same issues as some of the people are mentioning here with it crashing after the splash screen. It turned out to be because I copied some of the code from the website which has oddities. For example, the line: ?xml version=”1.0″ encoding=”utf-8″? you can clearly see that the double quote before and after utf-8 are different. For people having issues, I suggest you manually type every line rather than copy paste.
I've followed the tutorials on both this channel and CornboyzAndroid and I'm having the same problem. I have followed your instructions to the letter and yet the app completely skips the splash screen completely and goes straight to the app (which in my case is a calculator, 'cuz I'm boring)
Is there a way I can send this to you so you can have a look at it for me?
@OneViGOR what are you talking about? Calculators are sooooo gangsta! I'm guessing that in the manifest you have your Calc Class set to be the ".LAUNCHER" instead of the Splash Class, so just make the Splash Class set to .LAUNCHER and change the Calc Class to .DEFAULT. If you are like, "Travis, you are an idiot, didn't you read that I copied you verbatim?!?!?" you can send the project to travis@mybringback(dot)com.
@MaddogD86 Hey maddog, check your imports, if there is import android.R, delete it. Also save all your files, and clean the project. For more info check my blog post on our website mybringback(dot)com >blog>Travis Android Help
Is there any way you could post a picture or something on what your code should look like at the end? because I messed up and I have no idea what I did wrong. :/ and I no errors I fixed them. tho I have a warning sign for the textview and both buttons saying "[I18N] Hardcoded string "butten 2", should use @string resource" and I type'd what you did. I've had these sense I wrote it. and it luanches the app and does the starting up screen then crashes when it should go to the menu :/
@MrLolztome1 Try it. Logically I was thinking the same thing, but "com.mybringback.thebasicsMENU" might not be a intent by default, and startActivity might see it as a string instead, so if that is the case it would not work. However it might see it as a intent and if it does it will work. Try it, I'm just watching before I actually start coding.
Hi Travis, when i start my program with com.myownpackage.thebasics.SPLASH, it gives me an error after the 5 seconds screen is loaded saying an unexpected error occurred. But when I keep the previous name com.myownpackage.thebasics.MENU the program works fine. Why is that?
im pretty sure i have all the code exactly the same, but when i try to run the application on the emulator, the splash screen works, and then it says the application has stopped unexpectedly. any idea whats wrong?
When I clean my project, I still cannot reference my image for the background. I can however, reference the image for the icon in the manifest file. If I restart Eclipse, it works and I can set it as a background. How do you get eclipse to refresh the images without having to restart it???
@cfsnipa most likely you have changed your "laucher" class within the mainifest to .DEFAULT instead of .LAUNCHER you need to have one and only one .LAUNCHER class/actiivity defined in the manifest... hope you know what I'm talking about. If not, feel free to ask for help in the forum at mybringback(dot)com
Hey Travis - originally saw this video on the Cornboyz channel - have sent you an email - was getting error messages - copied your code verbatim. If there''s anychance you could let me know where i'm going wrong - happy to slip you some beer money! Jez CMP
@exjrain I get the same error sometimes often after a clean. Just check there are no errors in the XML files and the errors will disapear when you'll click on Build.
@exjrain Check if your R.java file is in your gen folder. If it isn't then check if your project has any errors and clean the project. It should generate itself again.
So program too was crashing after the splash screen, the way that I fixed it was accidental and doesn't make sense, but I thought I would post it anyway just in case it works for others:
I changed the
category android:name="android.intent.category.LAUNCHER"
in the manifest to
category android:name="android.intent.category.DEFAULT"
I ran it, it gave this error:
"no launcher activity found!"
when I undid the DEFAULT change, it worked!!
ElSuperFamilia 5 days ago
I too, am getting the force close error after the 5 second splash screen. Any idea as to how I am able to fix this?
plasid68 2 weeks ago
I was having the same issues as some of the people are mentioning here with it crashing after the splash screen. It turned out to be because I copied some of the code from the website which has oddities. For example, the line: ?xml version=”1.0″ encoding=”utf-8″? you can clearly see that the double quote before and after utf-8 are different. For people having issues, I suggest you manually type every line rather than copy paste.
Coolman25 3 weeks ago
I've followed the tutorials on both this channel and CornboyzAndroid and I'm having the same problem. I have followed your instructions to the letter and yet the app completely skips the splash screen completely and goes straight to the app (which in my case is a calculator, 'cuz I'm boring)
Is there a way I can send this to you so you can have a look at it for me?
OneViGOR 1 month ago
@OneViGOR what are you talking about? Calculators are sooooo gangsta! I'm guessing that in the manifest you have your Calc Class set to be the ".LAUNCHER" instead of the Splash Class, so just make the Splash Class set to .LAUNCHER and change the Calc Class to .DEFAULT. If you are like, "Travis, you are an idiot, didn't you read that I copied you verbatim?!?!?" you can send the project to travis@mybringback(dot)com.
mybringback 1 month ago
Now I'm getting "splash cannot be resolved or is not a field....."
MaddogD86 1 month ago in playlist Android Development For Absolute Beginners
@MaddogD86 Hey maddog, check your imports, if there is import android.R, delete it. Also save all your files, and clean the project. For more info check my blog post on our website mybringback(dot)com >blog>Travis Android Help
mybringback 1 month ago
Is there any way you could post a picture or something on what your code should look like at the end? because I messed up and I have no idea what I did wrong. :/ and I no errors I fixed them. tho I have a warning sign for the textview and both buttons saying "[I18N] Hardcoded string "butten 2", should use @string resource" and I type'd what you did. I've had these sense I wrote it. and it luanches the app and does the starting up screen then crashes when it should go to the menu :/
MaddogD86 1 month ago in playlist Android Development For Absolute Beginners
"Intent cannot be resolved to a type" What should I do?
bakeandmakeacake 2 months ago
Comment removed
bakeandmakeacake 2 months ago
@mybringback Hi Im one of ur biggest fans! So i have a doubt in the Intent menuIntent - new Intent ("com.mybringback.thebasics.MENU") part
i can instead give it as startActivity("com.mybringback.thebasicsMENU")
right? correct me if im wrong
MrLolztome1 2 months ago in playlist Android Development For Absolute Beginners
@MrLolztome1 Try it. Logically I was thinking the same thing, but "com.mybringback.thebasicsMENU" might not be a intent by default, and startActivity might see it as a string instead, so if that is the case it would not work. However it might see it as a intent and if it does it will work. Try it, I'm just watching before I actually start coding.
lt99range 1 week ago in playlist mybringback android tutorial
How can you make a loop in a thread?
jacobbubble2 2 months ago in playlist Android Development For Absolute Beginners
Hi Travis, when i start my program with com.myownpackage.thebasics.SPLASH, it gives me an error after the 5 seconds screen is loaded saying an unexpected error occurred. But when I keep the previous name com.myownpackage.thebasics.MENU the program works fine. Why is that?
doiohods 2 months ago
After 8 Tutorials it's time for me to say something lol.
These Tutorials are great, I never worked with Java so I don't know for how long I can keep up but then I can do your Java Tutorials too lol.
Number 8 was the first one I had to pause and rewind to take in the info, I don't know if that's a good sign lol
Thx for these Tutorials, I reg. on the forum and getting answers to my questions over there real quick.
TheDubbellu 2 months ago
im pretty sure i have all the code exactly the same, but when i try to run the application on the emulator, the splash screen works, and then it says the application has stopped unexpectedly. any idea whats wrong?
RootYourAndroid 2 months ago
When I clean my project, I still cannot reference my image for the background. I can however, reference the image for the icon in the manifest file. If I restart Eclipse, it works and I can set it as a background. How do you get eclipse to refresh the images without having to restart it???
jacobbubble2 3 months ago in playlist Android Development For Absolute Beginners
Thanks for these tutorials ! They are really helpful ! Lol Im writing a comment to every video u got:)
dar1e 4 months ago
BRILLIANT!! Easy to understand, just right. Thanks Travis |¬)
jazzninja77 4 months ago
"no launcher activity found!
The launcher will only sync the application package on the device!"
Help?? lol
cfsnipa 4 months ago
@cfsnipa most likely you have changed your "laucher" class within the mainifest to .DEFAULT instead of .LAUNCHER you need to have one and only one .LAUNCHER class/actiivity defined in the manifest... hope you know what I'm talking about. If not, feel free to ask for help in the forum at mybringback(dot)com
mybringback 4 months ago
too cool... moving on up to number nine...
tlmcqu80 4 months ago
nice tutorial. PEACE.
array1973 6 months ago
this fucking rules. nice vids
JDNielsenCofC 6 months ago
okay so there is no errors but when i launch it i get cant launch at this time foreclose type error
thenaenaeshow 6 months ago
@thenaenaeshow Same thing here, no errors at all, but force close after the Splash image. Awsome work however man
CynicalSpix 6 months ago
@CynicalSpix Sorry, I solved it. Great work, this tutorials are fenomenal
CynicalSpix 6 months ago
@CynicalSpix mine did the same. took me awhile but i figured out that i spelt DEFAULT wrong in the manifest maybe you did the same?
catlovexi 6 months ago
thank you! saved me a lot of time !
andaas4 3 months ago
Comment removed
thenaenaeshow 6 months ago
Hey Travis - originally saw this video on the Cornboyz channel - have sent you an email - was getting error messages - copied your code verbatim. If there''s anychance you could let me know where i'm going wrong - happy to slip you some beer money! Jez CMP
celebritymurderparty 7 months ago
You're the man as always Travis. Really dude keep on putting out videos!
chrispierick 7 months ago
@exjrain I get the same error sometimes often after a clean. Just check there are no errors in the XML files and the errors will disapear when you'll click on Build.
(Sorry for my English...)
Kesslinger78 9 months ago
setContentView(R.layout.main);
I get an error on that line that says menu cannot be resolved or is not a field. Same with the reference to the splash xml. Any ideas how to fix?
exjrain 9 months ago
@exjrain Check if your R.java file is in your gen folder. If it isn't then check if your project has any errors and clean the project. It should generate itself again.
Hajnos100 9 months ago