Go Back   Android Forums > Android Development > Application Development
Application Development Dev Lounge for the Coder Folks
Gamers - Check out our new sister sites!
Nintendo Wii U!    |    OUYA - $99 Android System!

test: Reply
 
LinkBack Thread Tools
Old February 28th, 2011, 08:53 AM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Feb 2011
Posts: 10
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default AHHHHHHH Please help!

Hello,

I am working on something that basically does the following:

Opens a splash screen plays a little tune hangs for a couple of seconds and then goes onto a different screen which has two buttons and a little bit of text.

It gets stuck when it tried to go onto the second screen, there are no error messages that i can see. There is one thing on my java code page for this screen that is crashing which says Source Not Found, the source attachment does not contain the source for the Activity.class.

There is a button to change attached source but i havent a clue what to do.

Any ideas?

matt20687 is offline  
Reply With Quote
Sponsors
Old February 28th, 2011, 09:17 AM   #2 (permalink)
New Member
 
Join Date: Feb 2011
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 1 Time in 1 Post
Default

Sounds like you may have forgotten to add the new activity to the manifest. Go to manifest/Application tab and at the bottom is Application nodes, add the activity there.

If you have done that, then I think you need to show code to help diagnose the problem.
jimthechimp is offline  
Reply With Quote
Old February 28th, 2011, 09:57 AM   #3 (permalink)
New Member
Thread Author (OP)
 
Join Date: Feb 2011
Posts: 10
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

I have taken a look and it is in there unfortunately. My .xml code for my manifest is below.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cornboyz.thebasics"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />

<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".myMain"
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=".myMenu"
android:label="@string/app_name">
<intent-filter>
<action android:name="com.cornboyz.thebasics.CLEARSCREEN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name=".tutorialOne"
android:label="@string/app_name">
<intent-filter>
<action android:name="com.cornboyz.thebasics.TUTORIALONE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>


__________________________________________________ ____________
MY CODE FOR THE ONE THAT IS CRASHING
__________________________________________________ ____________
package com.cornboyz.thebasics;

import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class myMenu extends Activity{

MediaPlayer mpButtonClick;

@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

//set up the button sound
final MediaPlayer mpButtonClick = MediaPlayer.create(this, R.raw.chimes);


Button bTutorial1 = (Button) findViewById(R.id.tutorial1);
bTutorial1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
startActivity(new Intent("com.cornboyz.thebasics.TUTORIALONE"));
mpButtonClick.start();
}
});


}


}
matt20687 is offline  
Reply With Quote
Old February 28th, 2011, 10:44 AM   #4 (permalink)
New Member
Thread Author (OP)
 
Join Date: Feb 2011
Posts: 10
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there anything else anyone needs to help me with this?
matt20687 is offline  
Reply With Quote
Old February 28th, 2011, 01:18 PM   #5 (permalink)
New Member
Thread Author (OP)
 
Join Date: Feb 2011
Posts: 10
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

After looking into this using google it looks as though it is the JAR file that is causing me problem. I have the following error. Can anyone translate this into english?

// Compiled from View.java (version 1.5 : 49.0, no super bit)
public abstract static interface android.view.View$OnClickListener {

// Method descriptor #4 (Landroid/view/ViewV
public abstract void onClick(android.view.View arg0);

Inner classes:
[inner class info: #1 android/view/View$OnClickListener, outer class info: #7 android/view/View
inner name: #9 OnClickListener, accessflags: 1545 public abstract static]
}
matt20687 is offline  
Reply With Quote
Old February 28th, 2011, 06:48 PM   #6 (permalink)
Junior Member
 
idavis's Avatar
 
Join Date: Feb 2011
Posts: 27
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 4 Times in 4 Posts
Default

You might have to extend your main class:

public class myMenu extends Activity{

might have to be

public class myMenu extends myMain{
idavis is offline  
Reply With Quote
Old March 1st, 2011, 05:24 AM   #7 (permalink)
New Member
Thread Author (OP)
 
Join Date: Feb 2011
Posts: 10
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

I seem to have fiddled too much. I have somehow lost my source folder in the package explorer and my code is now showing error messages. How can i get them back?
matt20687 is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 09:27 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.