Opening Second Aapp's Specific Activity - android

I have two applications App1 and App2 I want to open App2's Third activity from App1 and I want to pass some values between applications too. How can I do this.?
I have tried this:
Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.example.aap2.MainActivity3");
startActivity(LaunchIntent);
But I am getting exception.
01-23 00:18:04.150: E/AndroidRuntime(5323): java.lang.IllegalStateException: Could not execute method of the activity
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.view.View$1.onClick(View.java:2144)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.view.View.performClick(View.java:2485)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.view.View$PerformClick.run(View.java:9080)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.os.Handler.handleCallback(Handler.java:587)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.os.Handler.dispatchMessage(Handler.java:92)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.os.Looper.loop(Looper.java:130)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.app.ActivityThread.main(ActivityThread.java:3714)
01-23 00:18:04.150: E/AndroidRuntime(5323): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 00:18:04.150: E/AndroidRuntime(5323): at java.lang.reflect.Method.invoke(Method.java:507)
01-23 00:18:04.150: E/AndroidRuntime(5323): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
01-23 00:18:04.150: E/AndroidRuntime(5323): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
01-23 00:18:04.150: E/AndroidRuntime(5323): at dalvik.system.NativeStart.main(Native Method)
01-23 00:18:04.150: E/AndroidRuntime(5323): Caused by: java.lang.reflect.InvocationTargetException
01-23 00:18:04.150: E/AndroidRuntime(5323): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 00:18:04.150: E/AndroidRuntime(5323): at java.lang.reflect.Method.invoke(Method.java:507)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.view.View$1.onClick(View.java:2139)
01-23 00:18:04.150: E/AndroidRuntime(5323): ... 11 more
01-23 00:18:04.150: E/AndroidRuntime(5323): Caused by: java.lang.NullPointerException
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1374)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.app.Activity.startActivityForResult(Activity.java:2827)
01-23 00:18:04.150: E/AndroidRuntime(5323): at android.app.Activity.startActivity(Activity.java:2933)
01-23 00:18:04.150: E/AndroidRuntime(5323): at com.example.aap1.MainActivity1.one(MainActivity1.java:27)

The problem is here
Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.example.aap2.MainActivity3");
here you have to pass the packagename but you are passing Activity name..that too the above will return the launcher Activity you have set in the manifest file..
For this you need to change your code like this..
Intent i = new Intent();
i.setClassName("com.example.aap2", "com.example.aap2.MainActivity3");
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
And set android:export="true" for MainActivity3 in Manifest.

Use
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.example.app2", "com.example.aap2.MainActivity3"));
//intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // Make sure this falg is really need.
startActivity(intent);
Useful resources
Allowing Other Apps to Start Your Activity
Interacting with Other Apps
You need to write Activity declaration into manifest as (for second app)
<activity android:name=".MainActivity3"
android:label="#string/app_name"
android:exported="true" >
// Add intent filter if any.
</activity>

Use this only if you don't know the Activity Name and don't pass activity name in it like you did
Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.example.aap2");
Otherwise just simply try following method, the usual method to open another activity is
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName("com.package.address","com.package.address.MainActivity"));
startActivity(intent);

Related

Sound board with ImageButtons

I'm trying to make a sound board but I'm getting this error.
I might be reading the log wrong but it appears something is wrong with the image buttons.
Any ideas??
01-23 15:59:03.667: E/AndroidRuntime(19712): FATAL EXCEPTION: main
01-23 15:59:03.667: E/AndroidRuntime(19712): java.lang.RuntimeException:
Unable to start activity ComponentInfo{com.example.bluffball/com.example.bluffball.Content}: java.lang.ClassCastException: android.widget.ImageButton cannot be cast to android.widget.Button
01-23 15:59:03.667: E/AndroidRuntime(19712): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2071)
01-23 15:59:03.667: E/AndroidRuntime(19712): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2096)
01-23 15:59:03.667: E/AndroidRuntime(19712): at android.app.ActivityThread.access$600(ActivityThread.java:138)
01-23 15:59:03.667: E/AndroidRuntime(19712): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
01-23 15:59:03.667: E/AndroidRuntime(19712): at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 15:59:03.667: E/AndroidRuntime(19712): at android.os.Looper.loop(Looper.java:213)
01-23 15:59:03.667: E/AndroidRuntime(19712): at android.app.ActivityThread.main(ActivityThread.java:4787)
01-23 15:59:03.667: E/AndroidRuntime(19712): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 15:59:03.667: E/AndroidRuntime(19712): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 15:59:03.667: E/AndroidRuntime(19712): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
01-23 15:59:03.667: E/AndroidRuntime(19712): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
01-23 15:59:03.667: E/AndroidRuntime(19712): at dalvik.system.NativeStart.main(Native Method)
01-23 15:59:03.667: E/AndroidRuntime(19712): Caused by: java.lang.ClassCastException: android.widget.ImageButton cannot be cast to android.widget.Button
01-23 15:59:03.667: E/AndroidRuntime(19712): at com.example.bluffball.Content.onCreate(Content.java:106)
01-23 15:59:03.667: E/AndroidRuntime(19712): at android.app.Activity.performCreate(Activity.java:5008)
01-23 15:59:03.667: E/AndroidRuntime(19712): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
01-23 15:59:03.667: E/AndroidRuntime(19712): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2035)
01-23 15:59:03.667: E/AndroidRuntime(19712): ... 11 more
01-23 15:59:05.789: I/Process(19712): Sending signal. PID: 19712 SIG: 9
It tells you quite plainly, android.widget.ImageButton cannot be cast to android.widget.Button in your `Content.java' at line 106.
You probably have a statement there which reads something like
Button someButton = (Button) findViewById( R.id. ... )
when it should be
ImageButton someButton = (ImageButton) findViewById( R.id. ... )

Showing fragment inside popup window

I'm working on showing fragment inside popup window. But I'm getting error in showing in that. I googled it for solution. But still not solving this one. Please help me. I'm new to android. My code is
MainActivity.java
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
View popUp = getLayoutInflater().inflate(R.layout.popup_item, null);
window = new PopupWindow(getApplicationContext());
window = new PopupWindow(popUp,LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT,true);
window.setAnimationStyle(android.R.style.Animation_Activity);
window.showAtLocation(popUp, Gravity.BOTTOM, 0, 0);
window.setFocusable(true);
window.setOutsideTouchable(true);
}
popupitem.xml //for showing fragment in MainActivity
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<fragment
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:id="#+id/popup_fragment"
android:name="com.example.popupemoji.PopupFragment"
android:tag=""/>
</LinearLayout>
I have a class extending Fragment with only two line of code on onCreateView
View view = inflater.inflate(R.layout.popup_item, container);
return view;
Am I wrong anywhere. Logcat error is
01-23 14:25:24.005: E/AndroidRuntime(2868): FATAL EXCEPTION: main
01-23 14:25:24.005: E/AndroidRuntime(2868): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.popupemoji/com.example.popupemoji.MainActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.ActivityThread.access$600(ActivityThread.java:141)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.os.Looper.loop(Looper.java:137)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.ActivityThread.main(ActivityThread.java:5041)
01-23 14:25:24.005: E/AndroidRuntime(2868): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 14:25:24.005: E/AndroidRuntime(2868): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 14:25:24.005: E/AndroidRuntime(2868): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
01-23 14:25:24.005: E/AndroidRuntime(2868): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
01-23 14:25:24.005: E/AndroidRuntime(2868): at dalvik.system.NativeStart.main(Native Method)
01-23 14:25:24.005: E/AndroidRuntime(2868): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-23 14:25:24.005: E/AndroidRuntime(2868): at com.example.popupemoji.PopupFragment.onCreateView(PopupFragment.java:15)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:900)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1082)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1184)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:291)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-23 14:25:24.005: E/AndroidRuntime(2868): at com.example.popupemoji.MainActivity.onCreate(MainActivity.java:18)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.Activity.performCreate(Activity.java:5104)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
01-23 14:25:24.005: E/AndroidRuntime(2868): ... 11 more
01-23 14:25:24.005: E/AndroidRuntime(2868): Caused by: java.lang.IllegalArgumentException: Binary XML file line #6: Duplicate id 0x7f080002, tag , or parent id 0x0 with another fragment for com.example.popupemoji.PopupFragment
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:296)
01-23 14:25:24.005: E/AndroidRuntime(2868): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
If I am reading your code correctly, you are creating a View by inflating your popup_item.xml layout. This layout contains a Fragment, which also inflates the popup_item.xml.
Thus that Fragment will also have another Fragment inside of it with the popup_item.xml layout, and this will keep going on indefinitely.
Your error shows that the application is crashing because of this:
Caused by: java.lang.IllegalArgumentException: Binary XML file line #6:
Duplicate id 0x7f080002, tag , or parent id 0x0 with another fragment
for com.example.popupemoji.PopupFragment
Because of this popup_item.xml nesting, multiple Views have the same ID, which is a problem. Even if multiple Views could have the same ID, you would have an infinitely nesting Fragment, which would also be a problem.

Getting strange exception while deleting sms from inbox

I am writing a project to delete sms from inbox.Most of the times it works fine,but sometime it gives strange exception.This is the stacktrace of exception:
01-23 16:41:20.016: E/AndroidRuntime(7328): FATAL EXCEPTION: main
01-23 16:41:20.016: E/AndroidRuntime(7328): android.database.sqlite.SQLiteException: error code 14: unable to open database file
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:146)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.content.ContentProviderProxy.delete(ContentProviderNative.java:503)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.content.ContentResolver.delete(ContentResolver.java:723)
01-23 16:41:20.016: E/AndroidRuntime(7328): at com.velosys.smsManager.Database.DatabaseHandlerRule.DeleteMessagesFromInbox(DatabaseHandlerRule.java:1441)
01-23 16:41:20.016: E/AndroidRuntime(7328): at com.velosys.smsManager.Database.DatabaseHandlerRule.deleteContactOnBasisOfTime(DatabaseHandlerRule.java:1375)
01-23 16:41:20.016: E/AndroidRuntime(7328): at com.velosys.smsManager.Activities.SplashActivity$2.run(SplashActivity.java:132)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.os.Handler.handleCallback(Handler.java:618)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.os.Handler.dispatchMessage(Handler.java:123)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.os.Looper.loop(SourceFile:351)
01-23 16:41:20.016: E/AndroidRuntime(7328): at android.app.ActivityThread.main(ActivityThread.java:3850)
01-23 16:41:20.016: E/AndroidRuntime(7328): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 16:41:20.016: E/AndroidRuntime(7328): at java.lang.reflect.Method.invoke(Method.java:538)
01-23 16:41:20.016: E/AndroidRuntime(7328): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
01-23 16:41:20.016: E/AndroidRuntime(7328): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:659)
01-23 16:41:20.016: E/AndroidRuntime(7328): at dalvik.system.NativeStart.main(Native Method)
This is the line where i am deleting the sms from inbox and getting the exception:
l_contentResolver.delete(deleteUri, "address = ?" +" AND "+"date = ?",
new String[] {PhoneNumber,String.valueOf(DateandTime)});
This is the deleteUri:
Uri deleteUri = Uri.parse("content://sms");
This is l_contentResolver:
ContentResolver l_contentResolver = activity.getContentResolver();
I searched a lot about this exception but am not to figure out the reason for this in my code.Please help me.Thanks in advance.
I don't think that this is a problem in your code. If it only occurs in very few cases it is an error in the ContentProvider that manages the SMS.
Since the SMS API is not a public part of the Android API i don't think that there is some kind of documentation about this problems or a place to flag this as an Android Bug.
Maybe retry to delete the message a little bit later.

SQLCipher - Getting library loading error after system update

I've been testing my app for some time now without any problems. However, today I received a system update from T-Mobile on my myTouch 4G. My app, which uses SQLCipher now crashes on open with the following error:
01-23 20:43:37.200 E/AndroidRuntime(5534): FATAL EXCEPTION: main
01-23 20:43:37.200 E/AndroidRuntime(5534): java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1312]: 1235 cannot locate 'ucol_strcollIter_4_2'...
01-23 20:43:37.200 E/AndroidRuntime(5534):
01-23 20:43:37.200 E/AndroidRuntime(5534): at java.lang.Runtime.load(Runtime.java:394)
01-23 20:43:37.200 E/AndroidRuntime(5534): at java.lang.System.load(System.java:534)
01-23 20:43:37.200 E/AndroidRuntime(5534): at info.guardianproject.database.sqlcipher.SQLiteDatabase.loadLibs(SQLiteDatabase.java:123)
01-23 20:43:37.200 E/AndroidRuntime(5534): at com.app.myapp.datamanagement.DatabaseManager.open(DatabaseManager.java:62)
01-23 20:43:37.200 E/AndroidRuntime(5534): at com.app.myapp.datamanagement.DatabaseManager.<init>(DatabaseManager.java:58)
01-23 20:43:37.200 E/AndroidRuntime(5534): at com.app.myapp.datamanagement.DataManager.establishDatabase(DataManager.java:45)
01-23 20:43:37.200 E/AndroidRuntime(5534): at com.app.myapp.service.MainActivity.onCreate(NoteEditorDialogActivity.java:44)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1891)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1960)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.app.ActivityThread.access$1500(ActivityThread.java:145)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1045)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.os.Looper.loop(Looper.java:150)
01-23 20:43:37.200 E/AndroidRuntime(5534): at android.app.ActivityThread.main(ActivityThread.java:4369)
01-23 20:43:37.200 E/AndroidRuntime(5534): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 20:43:37.200 E/AndroidRuntime(5534): at java.lang.reflect.Method.invoke(Method.java:507)
01-23 20:43:37.200 E/AndroidRuntime(5534): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:846)
01-23 20:43:37.200 E/AndroidRuntime(5534): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:604)
01-23 20:43:37.200 E/AndroidRuntime(5534): at dalvik.system.NativeStart.main(Native Method)
I haven't tried reinstalling the app yet because I needed to preserve this error to debugging purposes but I'm sure it will fix this problem. I do, however, need to know why this error is happening and how I can prevent it so when I do publish the app, others won't experience this fatal crash.
Note: The system update seemed to be a minor one because I stayed on 2.3.4 before and after the update.
It seems you are missing depedency dlls (in your case 'ucol_strcollIter_4_2'....). Here is SO discussion regarding this error.
First, you should post this question to the SQLCipher Google Group: http://groups.google.com/group/sqlcipher
Second, are you using the final release of SQLCipher v1 aka 0.0.6 from November? https://github.com/downloads/sqlcipher/android-database-sqlcipher/SQLCipherForAndroid-SDK-0.0.6-FINAL.zip
I ask because it looks like you are having an issue that relates to linking against specific internal libraries, that was more common in earlier version of SQLCipher for Android.
Please try the "NoteCipher" app in the Android Market, and let me know if that works, as well, since it also includes SQLCipher.

gralloc_goldfish(634): Emulator without GPU emulation detected

I am using android SDK 4.0.3 and I'm trying to run a simple program in which I'm trying to switch from one page to another page using an Intent (By passing intent object as: Intent intent = new Intent(getApplicationContext(),SecondActivity.class);
startActivity(intent); )
[Also, I have 3GB RAM]
but when I run the program it gives something like this in DDMS:
01-23 01:58:23.892: D/gralloc_goldfish(634): Emulator without GPU emulation detected.
01-23 01:58:45.482: D/AndroidRuntime(634): Shutting down VM
01-23 01:58:45.492: W/dalvikvm(634): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
01-23 01:58:45.532: E/AndroidRuntime(634): FATAL EXCEPTION: main
01-23 01:58:45.532: E/AndroidRuntime(634): android.content.ActivityNotFoundException:
Unable to find explicit activity class {com.example.actionbar_demo/com.example.actionbar_demo.SecondActivity}; have you declared this activity in your AndroidManifest.xml?
01-23 01:58:45.532: E/AndroidRuntime(634): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1508)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.app.Activity.startActivityForResult(Activity.java:3190)
01-23 01:58:45.532: E/AndroidRuntime(634): at com.example.actionbar_demo.Actionbar_demoActivity$1.onClick(Actionbar_demoActivity.java:23)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.view.View.performClick(View.java:3511)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.view.View$PerformClick.run(View.java:14105)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.os.Handler.handleCallback(Handler.java:605)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.os.Handler.dispatchMessage(Handler.java:92)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.os.Looper.loop(Looper.java:137)
01-23 01:58:45.532: E/AndroidRuntime(634): at android.app.ActivityThread.main(ActivityThread.java:4424)
01-23 01:58:45.532: E/AndroidRuntime(634): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 01:58:45.532: E/AndroidRuntime(634): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 01:58:45.532: E/AndroidRuntime(634): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-23 01:58:45.532: E/AndroidRuntime(634): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-23 01:58:45.532: E/AndroidRuntime(634): at dalvik.system.NativeStart.main(Native Method)
01-23 01:58:49.173: I/Process(634): Sending signal. PID: 634 SIG: 9
If you're worried about the:
Emulator without GPU emulation detected.
I wouldn't be. Given that a cursory search of the net turns it up quite a bit, and it's not related to the specific problems being discussed, I'd say it's just an indication that your emulator simply doesn't emulate the GPU. It's unlikely to be a problem.
That's supported by the fact it's a debug message (not even a warning, let alone an error) and also that there's a big 42-second gap between that and your actual problem.
The actual problem seems to be indicated by the line:
01-23 01:58:45.532: E/AndroidRuntime(634):
android.content.ActivityNotFoundException: Unable to find explicit activity
class {com.example.actionbar_demo/com.example.actionbar_demo.SecondActivity};
have you declared this activity in your AndroidManifest.xml?
So I have to ask: have you declared this activity in your AndroidManifest.xml?

Categories

Resources