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.
Related
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);
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am trying to setText of edittext using java but it is not working and force closing my application, though i am not sure why
Java Code
EditText UserProfileFirstName;
UserProfileFirstName = (EditText) findViewById(R.id.userFirstName);
UserProfileFirstName.setText("John");
Xml
<EditText
android:id="#+id/userFirstName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:textSize="22sp"
android:layout_marginTop="40dp"
android:layout_marginBottom="15dp"
android:hint="First Name"
android:ems="10"
/>
LogCat Error
01-23 09:32:15.564: E/AndroidRuntime(4101): FATAL EXCEPTION: main
01-23 09:32:15.564: E/AndroidRuntime(4101): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.unext.unextlibrary/com.unext.unextlibrary.ProfileActivity}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.unext.unextlibrary/com.unext.unextlibrary.UserProfile}: java.lang.NullPointerException
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.access$600(ActivityThread.java:141)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.os.Looper.loop(Looper.java:137)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.main(ActivityThread.java:5039)
01-23 09:32:15.564: E/AndroidRuntime(4101): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 09:32:15.564: E/AndroidRuntime(4101): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 09:32:15.564: E/AndroidRuntime(4101): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
01-23 09:32:15.564: E/AndroidRuntime(4101): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
01-23 09:32:15.564: E/AndroidRuntime(4101): at dalvik.system.NativeStart.main(Native Method)
01-23 09:32:15.564: E/AndroidRuntime(4101): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.unext.unextlibrary/com.unext.unextlibrary.UserProfile}: java.lang.NullPointerException
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.startActivityNow(ActivityThread.java:2023)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:749)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.widget.TabHost.setCurrentTab(TabHost.java:413)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.widget.TabHost.addTab(TabHost.java:240)
01-23 09:32:15.564: E/AndroidRuntime(4101): at com.unext.unextlibrary.ProfileActivity.onCreate(ProfileActivity.java:105)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.Activity.performCreate(Activity.java:5104)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
01-23 09:32:15.564: E/AndroidRuntime(4101): ... 11 more
01-23 09:32:15.564: E/AndroidRuntime(4101): Caused by: java.lang.NullPointerException
01-23 09:32:15.564: E/AndroidRuntime(4101): at com.unext.unextlibrary.UserProfile.onCreate(UserProfile.java:57)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.Activity.performCreate(Activity.java:5104)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
01-23 09:32:15.564: E/AndroidRuntime(4101): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
01-23 09:32:15.564: E/AndroidRuntime(4101): ... 21 more
I searched on google and also saw SO answers but nothing seems to be working for me
Add
setContentView(R.layout.LAYOUTNAME); in oncreate, before you try to get view by
UserProfileFirstName = (EditText) findViewById(R.id.userFirstName);
// here LAYOUTNAME is your layout's name where you define this edittext
I implement the mediation ad in android but it is not showing i use currently AdMob House Ads and Hunt Mobile Ads in Ad Network Mediation.
i implement both the xml and java coding way but neither work for me.
my xml code
<com.google.ads.AdView
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="#+id/ad"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
ads:adSize="SMART_BANNER"
ads:adUnitId="6cd435789dcc43c0"
ads:loadAdOnCreate="true" />
and the log cat error is
01-23 19:13:10.079: E/Ads(1771): Cannot find adapter class 'com.huntmads.admobadaptor.HuntMadsAdapter'. Did you link the ad network's mediation adapter? Skipping ad network.
01-23 19:13:10.079: E/Ads(1771): java.lang.ClassNotFoundException: com.huntmads.admobadaptor.HuntMadsAdapter
01-23 19:13:10.079: E/Ads(1771): at java.lang.Class.classForName(Native Method)
01-23 19:13:10.079: E/Ads(1771): at java.lang.Class.forName(Class.java:217)
01-23 19:13:10.079: E/Ads(1771): at java.lang.Class.forName(Class.java:172)
01-23 19:13:10.079: E/Ads(1771): at com.google.ads.g.a(SourceFile:133)
01-23 19:13:10.079: E/Ads(1771): at com.google.ads.i.run(SourceFile:116)
01-23 19:13:10.079: E/Ads(1771): at android.os.Handler.handleCallback(Handler.java:605)
01-23 19:13:10.079: E/Ads(1771): at android.os.Handler.dispatchMessage(Handler.java:92)
01-23 19:13:10.079: E/Ads(1771): at android.os.Looper.loop(Looper.java:137)
01-23 19:13:10.079: E/Ads(1771): at android.app.ActivityThread.main(ActivityThread.java:4424)
01-23 19:13:10.079: E/Ads(1771): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 19:13:10.079: E/Ads(1771): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 19:13:10.079: E/Ads(1771): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-23 19:13:10.079: E/Ads(1771): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-23 19:13:10.079: E/Ads(1771): at dalvik.system.NativeStart.main(Native Method)
01-23 19:13:10.079: E/Ads(1771): Caused by: java.lang.NoClassDefFoundError: com/huntmads/admobadaptor/HuntMadsAdapter
01-23 19:13:10.079: E/Ads(1771): ... 14 more
01-23 19:13:10.079: E/Ads(1771): Caused by: java.lang.ClassNotFoundException: com.huntmads.admobadaptor.HuntMadsAdapter
01-23 19:13:10.079: E/Ads(1771): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
01-23 19:13:10.079: E/Ads(1771): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
01-23 19:13:10.079: E/Ads(1771): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
01-23 19:13:10.079: E/Ads(1771): ... 14 more
It sounds like you have the Admob package downloaded, but you need to also download the .jar file for the other types of ads. Google provides instructions for all mediated ads, and the specific download link for the Huntmads jar.
We released an App in the market yesterday and i see that it doesn't install on HTC/Sony Ericsson phones. i could finally get my hands on a HTC phone and got the following logcat but am not able to debug and retify the issue
Device Info
build.board: montblanc
build.bootloader: s1
build.brand: SEMC
build.cpu_abi: armeabi-v7a
build.cpu_abi2: armeabi
build.device: LT22i
build.display: 6.1.1.B.1.54
build.fingerprint: SEMC/LT22i_1261-6006/LT22i:4.0.4/6.1.1.B.1.54/ybt3zw:user/release-keys
build.hardware: st-ericsson
build.host: BuildHost
build.id: 6.1.1.B.1.54
build.manufacturer: Sony
build.model: LT22i
build.product: LT22i_1261-6006
build.radio: unknown
build.serial: CB5121XDB7
build.tags: release-keys
build.time: 1350305827000
build.type: user
build.user: BuildUser
version.codename: REL
version.incremental: ybt3zw
version.release: 4.0.4
version.sdk_int: 15
Log Cat
01-23 00:09:35.735 E/AndroidRuntime(29152): FATAL EXCEPTION: main
01-23 00:09:35.735 E/AndroidRuntime(29152): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.m7.nomad/com.m7.nomad.SplashActivity}: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.ActivityThread.access$600(ActivityThread.java:127)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.os.Looper.loop(Looper.java:137)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.ActivityThread.main(ActivityThread.java:4448)
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
01-23 00:09:35.735 E/AndroidRuntime(29152): at dalvik.system.NativeStart.main(Native Method)
01-23 00:09:35.735 E/AndroidRuntime(29152): Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.createView(LayoutInflater.java:606)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2712)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2772)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.Activity.setContentView(Activity.java:1835)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.m7.nomad.SplashActivity.onCreate(SplashActivity.java:46)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.Activity.performCreate(Activity.java:4465)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
01-23 00:09:35.735 E/AndroidRuntime(29152): ... 11 more
01-23 00:09:35.735 E/AndroidRuntime(29152): Caused by: java.lang.reflect.InvocationTargetException
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.reflect.Constructor.constructNative(Native Method)
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.LayoutInflater.createView(LayoutInflater.java:586)
01-23 00:09:35.735 E/AndroidRuntime(29152): ... 25 more
01-23 00:09:35.735 E/AndroidRuntime(29152): Caused by: java.lang.NumberFormatException: Invalid int: "res/drawable-hdpi/ic_menu_share.png"
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.Integer.invalidInt(Integer.java:138)
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.Integer.parse(Integer.java:375)
01-23 00:09:35.735 E/AndroidRuntime(29152): at java.lang.Integer.parseInt(Integer.java:366)
01-23 00:09:35.735 E/AndroidRuntime(29152): at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.content.res.TypedArray.getInt(TypedArray.java:254)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.View.<init>(View.java:2969)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.view.ViewGroup.<init>(ViewGroup.java:418)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.widget.LinearLayout.<init>(LinearLayout.java:178)
01-23 00:09:35.735 E/AndroidRuntime(29152): at android.widget.LinearLayout.<init>(LinearLayout.java:174)
01-23 00:09:35.735 E/AndroidRuntime(29152): ... 28 more
01-23 00:09:36.246 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:36.246 E/wpa_supplicant(11724): 53 49 47 4e 41 4c 5f 50 4f 4c 4c SIGNAL_POLL
01-23 00:09:39.239 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:39.239 E/wpa_supplicant(11724): 53 49 47 4e 41 4c 5f 50 4f 4c 4c SIGNAL_POLL
01-23 00:09:41.161 E/AndroidRuntime(29212): FATAL EXCEPTION: main
01-23 00:09:41.161 E/AndroidRuntime(29212): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.m7.nomad/com.m7.nomad.SplashActivity}: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.ActivityThread.access$600(ActivityThread.java:127)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.os.Looper.loop(Looper.java:137)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.ActivityThread.main(ActivityThread.java:4448)
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
01-23 00:09:41.161 E/AndroidRuntime(29212): at dalvik.system.NativeStart.main(Native Method)
01-23 00:09:41.161 E/AndroidRuntime(29212): Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.createView(LayoutInflater.java:606)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2712)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2772)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.Activity.setContentView(Activity.java:1835)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.m7.nomad.SplashActivity.onCreate(SplashActivity.java:46)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.Activity.performCreate(Activity.java:4465)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
01-23 00:09:41.161 E/AndroidRuntime(29212): ... 11 more
01-23 00:09:41.161 E/AndroidRuntime(29212): Caused by: java.lang.reflect.InvocationTargetException
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.reflect.Constructor.constructNative(Native Method)
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.LayoutInflater.createView(LayoutInflater.java:586)
01-23 00:09:41.161 E/AndroidRuntime(29212): ... 25 more
01-23 00:09:41.161 E/AndroidRuntime(29212): Caused by: java.lang.NumberFormatException: Invalid int: "res/drawable-hdpi/ic_menu_share.png"
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.Integer.invalidInt(Integer.java:138)
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.Integer.parse(Integer.java:375)
01-23 00:09:41.161 E/AndroidRuntime(29212): at java.lang.Integer.parseInt(Integer.java:366)
01-23 00:09:41.161 E/AndroidRuntime(29212): at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.content.res.TypedArray.getInt(TypedArray.java:254)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.View.<init>(View.java:2969)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.view.ViewGroup.<init>(ViewGroup.java:418)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.widget.LinearLayout.<init>(LinearLayout.java:178)
01-23 00:09:41.161 E/AndroidRuntime(29212): at android.widget.LinearLayout.<init>(LinearLayout.java:174)
01-23 00:09:41.161 E/AndroidRuntime(29212): ... 28 more
01-23 00:09:42.252 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:42.252 E/wpa_supplicant(11724): 53 49 47 4e 41 4c 5f 50 4f 4c 4c SIGNAL_POLL
01-23 00:09:45.255 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:45.255 E/wpa_supplicant(11724): 53 49 47 4e 41 4c 5f 50 4f 4c 4c SIGNAL_POLL
01-23 00:09:48.268 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:48.268 E/wpa_supplicant(11724): 53 49 47 4e 41 4c 5f 50 4f 4c 4c SIGNAL_POLL
01-23 00:09:51.261 E/wpa_supplicant(11724): RX ctrl_iface - hexdump_ascii(len=11):
01-23 00:09:51.261 E/wpa_supplicant(11724): 53 49 47 4e 41 4c 5f 50 4f 4c 4c SIGNAL_POLL
01-23 00:09:52.061 E/AndroidRuntime(29272): FATAL EXCEPTION: main
01-23 00:09:52.061 E/AndroidRuntime(29272): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.m7.nomad/com.m7.nomad.SplashActivity}: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.ActivityThread.access$600(ActivityThread.java:127)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.os.Handler.dispatchMessage(Handler.java:99)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.os.Looper.loop(Looper.java:137)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.ActivityThread.main(ActivityThread.java:4448)
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.reflect.Method.invokeNative(Native Method)
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.reflect.Method.invoke(Method.java:511)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:823)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:590)
01-23 00:09:52.061 E/AndroidRuntime(29272): at dalvik.system.NativeStart.main(Native Method)
01-23 00:09:52.061 E/AndroidRuntime(29272): Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.LinearLayout
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.createView(LayoutInflater.java:606)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2712)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2772)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.Activity.setContentView(Activity.java:1835)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.m7.nomad.SplashActivity.onCreate(SplashActivity.java:46)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.Activity.performCreate(Activity.java:4465)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
01-23 00:09:52.061 E/AndroidRuntime(29272): ... 11 more
01-23 00:09:52.061 E/AndroidRuntime(29272): Caused by: java.lang.reflect.InvocationTargetException
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.reflect.Constructor.constructNative(Native Method)
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.LayoutInflater.createView(LayoutInflater.java:586)
01-23 00:09:52.061 E/AndroidRuntime(29272): ... 25 more
01-23 00:09:52.061 E/AndroidRuntime(29272): Caused by: java.lang.NumberFormatException: Invalid int: "res/drawable-hdpi/ic_menu_share.png"
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.Integer.invalidInt(Integer.java:138)
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.Integer.parse(Integer.java:375)
01-23 00:09:52.061 E/AndroidRuntime(29272): at java.lang.Integer.parseInt(Integer.java:366)
01-23 00:09:52.061 E/AndroidRuntime(29272): at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.content.res.TypedArray.getInt(TypedArray.java:254)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.View.<init>(View.java:2969)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.view.ViewGroup.<init>(ViewGroup.java:418)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.widget.LinearLayout.<init>(LinearLayout.java:178)
01-23 00:09:52.061 E/AndroidRuntime(29272): at android.widget.LinearLayout.<init>(LinearLayout.java:174)
01-23 00:09:52.061 E/AndroidRuntime(29272): ... 28 more
XML File (after making Changes)
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:contentDescription="Splash Screen"
android:gravity="center"
android:src="#drawable/splash_logo" />
XML before making changes
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/primary_color"
android:gravity="center"
android:orientation="vertical"
android:textAlignment="center" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:contentDescription="Splash Screen"
android:gravity="center"
android:src="#drawable/splash_logo" />
</RelativeLayout>
Please post your xml code here.
"Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget. LinearLayout". This line says there is something wrong at line 24.
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?