Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Structure Intent is undefined(Problem with my declaration and function call)
Structure Intent is undefined [message #666506] Wed, 20 April 2011 15:46 Go to next message
Hank Wilson is currently offline Hank WilsonFriend
Messages: 1
Registered: April 2011
Junior Member
Please be gentile Smile I am brand new to Eclipse and Java, I'm working with a project and am now at my menu screen, I have a series of if statements for the onclick() function, so that if a menu item is selected I want to start an activity, the code is

" startActivity(new Intent(AgMenuActivity.this, AgAuctionsActivity.class));"

the error I have is "the constructor intent(AgMenuActivity.this, class<AgAuctionsActivity> is undefined)

My code at the top is public class AgMenuActivity extends AgActivity {

my code in the AndroidManifest.xml file is
" <application android:label="@string/app_name" android:icon="@drawable/agicon" android:debuggable="true" android:allowClearUserData="true">
<activity android:name=".AgSplashActivity"
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="AgMenuActivity" android:launchMode="standard"></activity>
<activity android:name="AgAuctionsActivity" android:launchMode="standard"></activity>
<activity android:name="AgHelpActivity" android:launchMode="standard"></activity>
<activity android:name="AgResultsActivity" android:launchMode="standard"></activity>
<activity android:name="AgSettingsActivity" android:launchMode="standard"></activity>
</application>"

My splash screen works, my menu screen shows up (well it did prior to me putting in the code for the onclick())

I've searched for that message, but it seems that I have everything in place, except it's obvious that I don't, please help

Thank You


Re: Structure Intent is undefined [message #666522 is a reply to message #666506] Wed, 20 April 2011 16:39 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Hank,
Your question is a general Android/Java question, not really related to
Eclipse. I suggest you ask on the Android developer forums or mailing list.

Eric


On 4/20/11 11:46 AM, Hank Wilson wrote:
> Please be gentile :) I am brand new to Eclipse and Java, I'm working
> with a project and am now at my menu screen, I have a series of if
> statements for the onclick() function, so that if a menu item is
> selected I want to start an activity, the code is
>
> " startActivity(new Intent(AgMenuActivity.this,
> AgAuctionsActivity.class));"
>
> the error I have is "the constructor intent(AgMenuActivity.this,
> class<AgAuctionsActivity> is undefined)
>
> My code at the top is public class AgMenuActivity extends AgActivity {
>
> my code in the AndroidManifest.xml file is
> " <application android:label="@string/app_name"
> android:icon="@drawable/agicon" android:debuggable="true"
> android:allowClearUserData="true">
> <activity android:name=".AgSplashActivity"
> 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="AgMenuActivity"
> android:launchMode="standard"></activity>
> <activity android:name="AgAuctionsActivity"
> android:launchMode="standard"></activity>
> <activity android:name="AgHelpActivity"
> android:launchMode="standard"></activity>
> <activity android:name="AgResultsActivity"
> android:launchMode="standard"></activity>
> <activity android:name="AgSettingsActivity"
> android:launchMode="standard"></activity>
> </application>"
>
> My splash screen works, my menu screen shows up (well it did prior to me
> putting in the code for the onclick())
>
> I've searched for that message, but it seems that I have everything in
> place, except it's obvious that I don't, please help
>
> Thank You
>
>
Previous Topic:Can't get program to run outside of Eclipse (yes,noob)
Next Topic:Creating Connection Profile for SQL Server 2008
Goto Forum:
  


Current Time: Thu Apr 25 21:20:46 GMT 2024

Powered by FUDForum. Page generated in 0.08046 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top