Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Android
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Tim Cooke
Devaka Cooray
Sheriffs:
Liutauras Vilda
paul wheaton
Rob Spoor
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Piet Souris
Mikalai Zaikin
Bartenders:
Carey Brown
Roland Mueller
Forum:
Android
Unable to find explicit activity class
Ruben Matt
Ranch Hand
Posts: 45
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi. I've done this so many times and now i'm stuck. I have my MainActivity and then i create a new Activity. I have a button to go to the other activity but when i click it gives me an error:
public void onClick(View arg0) { // TODO Auto-generated method stub Intent intent = new Intent(MainActivity.this,Teste.class); startActivity(intent); }
05-05 08:07:44.520: E/AndroidRuntime(1336): FATAL EXCEPTION: main 05-05 08:07:44.520: E/AndroidRuntime(1336): Process: com.exame.listintent, PID: 1336 05-05 08:07:44.520: E/AndroidRuntime(1336): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.exame.listintent/com.exame.listintent.Teste}; have you declared this activity in your AndroidManifest.xml? 05-05 08:07:44.520: E/AndroidRuntime(1336): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628) 05-05 08:07:44.520: E/AndroidRuntime(1336): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424) 05-05 08:07:44.520: E/AndroidRuntime(1336): at android.app.Activity.startActivityForResult(Activity.java:3424) 05-05 08:07:44.520: E/AndroidRuntime(1336): at android.app.Activity.startActivityForResult(Activity.java:3385) 05-05 08:07:44.520: E/AndroidRuntime(1336): at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:839) 05-05 08:07:44.520: E/AndroidRuntime(1336): at android.app.Activity.startActivity(Activity.java:3627) 05-05 08:07:44.520: E/AndroidRuntime(1336): at android.app.Activity.startActivity(Activity.java:3595) 05-05 08:07:44.520: E/AndroidRuntime(1336): at com.exame.listintent.MainActivity$1.onClick(MainActivity.java:31) 05-05 08:07:44.520: E/AndroidRuntime(1336): at android.view.View.performClick(View.java:4438) 05-05 08:07:44.520: E/AndroidRuntime(1336): at android.view.View$PerformClick.run(View.java:18422) 05-05 08:07:44.520: E/AndroidRuntime(1336): at android.os.Handler.handleCallback(Handler.java:733) 05-05 08:07:44.520: E/AndroidRuntime(1336): at android.os.Handler.dispatchMessage(Handler.java:95) 05-05 08:07:44.520: E/AndroidRuntime(1336): at android.os.Looper.loop(Looper.java:136) 05-05 08:07:44.520: E/AndroidRuntime(1336): at android.app.ActivityThread.main(ActivityThread.java:5017) 05-05 08:07:44.520: E/AndroidRuntime(1336): at java.lang.reflect.Method.invokeNative(Native Method) 05-05 08:07:44.520: E/AndroidRuntime(1336): at java.lang.reflect.Method.invoke(Method.java:515) 05-05 08:07:44.520: E/AndroidRuntime(1336): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 05-05 08:07:44.520: E/AndroidRuntime(1336): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 05-05 08:07:44.520: E/AndroidRuntime(1336): at dalvik.system.NativeStart.main(Native Method)
I went to the manifest and i thinks its everything fine:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.exame.listintent" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.exame.listintent.MainActivity" 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="com.exame.listintent.Teste" android:label="@string/title_activity_teste" > </activity> </application> </manifest>
Ruben Matt
Ranch Hand
Posts: 45
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Ok...... Somehow i put it to work.
Brad Rhoads
Greenhorn
Posts: 1
posted 9 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
Ruben Matt wrote:
Ok...... Somehow i put it to work.
What was the solution?
money grubbing section goes here:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
class not found exception
contacts doesn't display
unable to create the service ,it gives null pointer exception
map app gives me error
how to handle fatal exception,activity not found?
More...