Is there a way to see a complete stack trace from android? - android

When I get an uncaught exception in my app and the trace prints to the logcat, is there anyway to make the entire trace print out? At the end of the trace it always has something like "...10 more".
Example:
03-11 16:25:53.572: ERROR/AndroidRuntime(3297): Caused by: java.lang.ClassNotFoundException: net.notify.notifymdm.listeners.PackageInstallerReceiver in loader dalvik.system.PathClassLoader[/data/app/net.notify.notifymdm-2.apk]
03-11 16:25:53.572: ERROR/AndroidRuntime(3297): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
03-11 16:25:53.572: ERROR/AndroidRuntime(3297): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
03-11 16:25:53.572: ERROR/AndroidRuntime(3297): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
03-11 16:25:53.572: ERROR/AndroidRuntime(3297): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2780)
03-11 16:25:53.572: ERROR/AndroidRuntime(3297): ... 10 more

Usually the "...N more" represents n more lines of the same error, anyway.
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Throwable.html#printStackTrace%28%29

Related

Unable to use checkbox in eclipse with android adt plugin

I'm a newbie android app developer, beginner really. I've tried creating a checkbox on the xml layout on eclipse IDE, for some reason when I run app, it just crashes.
It says resource not found. Following is the logcat:
03-11 20:39:47.167: E/AndroidRuntime(24934): FATAL EXCEPTION: main
03-11 20:39:47.167: E/AndroidRuntime(24934): Process: com.example.checking, PID: 24934
03-11 20:39:47.167: E/AndroidRuntime(24934): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.checking/com.example.checking.MainActivity}: android.view.InflateException: Binary XML file line #13: Error inflating class android.widget.CheckBox
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2200)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2249)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.ActivityThread.access$800(ActivityThread.java:141)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.os.Handler.dispatchMessage(Handler.java:102)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.os.Looper.loop(Looper.java:136)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.ActivityThread.main(ActivityThread.java:5052)
03-11 20:39:47.167: E/AndroidRuntime(24934): at java.lang.reflect.Method.invokeNative(Native Method)
03-11 20:39:47.167: E/AndroidRuntime(24934): at java.lang.reflect.Method.invoke(Method.java:515)
03-11 20:39:47.167: E/AndroidRuntime(24934): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
03-11 20:39:47.167: E/AndroidRuntime(24934): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
03-11 20:39:47.167: E/AndroidRuntime(24934): at dalvik.system.NativeStart.main(Native Method)
03-11 20:39:47.167: E/AndroidRuntime(24934): Caused by: android.view.InflateException: Binary XML file line #13: Error inflating class android.widget.CheckBox
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.createView(LayoutInflater.java:623)
03-11 20:39:47.167: E/AndroidRuntime(24934): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:672)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.inflate(LayoutInflater.java:400)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
03-11 20:39:47.167: E/AndroidRuntime(24934): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.Activity.setContentView(Activity.java:1946)
03-11 20:39:47.167: E/AndroidRuntime(24934): at com.example.checking.MainActivity.onCreate(MainActivity.java:13)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.Activity.performCreate(Activity.java:5248)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2164)
03-11 20:39:47.167: E/AndroidRuntime(24934): ... 11 more
03-11 20:39:47.167: E/AndroidRuntime(24934): Caused by: java.lang.reflect.InvocationTargetException
03-11 20:39:47.167: E/AndroidRuntime(24934): at java.lang.reflect.Constructor.constructNative(Native Method)
03-11 20:39:47.167: E/AndroidRuntime(24934): at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.createView(LayoutInflater.java:597)
03-11 20:39:47.167: E/AndroidRuntime(24934): ... 24 more
03-11 20:39:47.167: E/AndroidRuntime(24934): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/abc_btn_check_material.xml from drawable resource ID #0x7f020003
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.loadDrawable(Resources.java:2149)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.MiuiResources.loadDrawable(MiuiResources.java:387)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.loadDrawable(Resources.java:2072)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.widget.CompoundButton.<init>(CompoundButton.java:74)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.widget.CheckBox.<init>(CheckBox.java:68)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.widget.CheckBox.<init>(CheckBox.java:64)
03-11 20:39:47.167: E/AndroidRuntime(24934): ... 27 more
03-11 20:39:47.167: E/AndroidRuntime(24934): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-v11/abc_btn_checkbox_checked_mtrl.xml from drawable resource ID #0x7f020004
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.loadDrawable(Resources.java:2149)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.MiuiResources.loadDrawable(MiuiResources.java:387)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.loadDrawable(Resources.java:2072)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.getDrawable(Resources.java:710)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:176)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:939)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:879)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.createFromXml(Resources.java:2525)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.loadDrawable(Resources.java:2145)
03-11 20:39:47.167: E/AndroidRuntime(24934): ... 33 more
03-11 20:39:47.167: E/AndroidRuntime(24934): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:9
Can someone help me fix this.
I'm assuming you've updated to v23.2 of the support library. I did the same and I had the very same issue. Here's how i fixed it, hope it works for you as well.
1) Update to the latest version of Gradle (1.5.0 as of posting this) from the Android Tools repo: ensure you have this in your Build.gradle file (the one outside all modules).
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
2) If you're using Android Studio 1.4, stop it from generating .png files from vector drawables at run time and use the support libraries, support-vector-drawable and animated-vector-drawable, to do the same instead. Add this to your Build gradle INSIDE your 'app' module
android {
defaultConfig {
generatedDensities = []
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
Also refer http://android-developers.blogspot.in/2016/02/android-support-library-232.html
Upgrading Android Design Support Library (com.android.support:design) from 23.2.0 to 23.2.1 may help solve the problem.
Upgrade support library to last version (23).
This exception it cause by android.content.res.Resources$NotFoundException: File res/drawable/abc_btn_check_material.xml, this is an element from last version of support library
I think you must migrate to AndroidStudio if you are beginner on Android, Eclipse stopped having support google in December 2015
PD: sorry for my english

How to resolve a stack trace error

I have an Android app which has a minimum SDK at 2.1 and I am getting the following stack trace in the developer console:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.versions.MyPhone}: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2705)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2721)
at android.app.ActivityThread.access$2300(ActivityThread.java:132)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4669)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:203)
at android.app.Activity.setContentView(Activity.java:1656)
at com.versions.MyPhone.onCreate(MyPhone.java:49)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2669)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at android.widget.LinearLayout.<init>(LinearLayout.java:115)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 21 more
Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:468)
at android.graphics.Bitmap.createBitmap(Bitmap.java:435)
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340)
at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
at android.content.res.Resources.loadDrawable(Resources.java:1709)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1885)
at android.view.View.<init>(View.java:1834)
at android.view.ViewGroup.<init>(ViewGroup.java:285)
The error doesn't happen in the newer devices with an updated Os.
Please help me resolve the issue or point me in the right direction.
Based on the java.lang.OutOfMemoryError: bitmap size exceeds VM budget message in the stack trace, it appears that one of the images in the view being opened in your onCreate() is too large.
Here's a page with some guidance. The main idea is to load a scaled down version of the image. I've found it best to also scale down (resolution, color-depth, etc.) the actual image file to maximize loading speed.

Sample weather app getting force close

I am new for this application and i am following tutorials to learn. I followed https://github.com/survivingwithandroid/Surviving-with-android/tree/master/WeatherForecastApp to test weather app but i am getting force close. I also goggled for this error but still i am not able to solve. If anybody faced this error please help.
Logcat error
E/AndroidRuntime(5988): FATAL EXCEPTION: main
E/AndroidRuntime(5988): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.survivingwithandroid.weatherapp/com.survivingwithandroid.weatherapp.MainActivity}: java.lang.ClassNotFoundException: com.survivingwithandroid.weatherapp.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.survivingwithandroid.weatherapp-2.apk]
E/AndroidRuntime(5988): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
E/AndroidRuntime(5988): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
E/AndroidRuntime(5988): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime(5988): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
E/AndroidRuntime(5988): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(5988): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime(5988): at android.app.ActivityThread.main(ActivityThread.java:3687)
E/AndroidRuntime(5988): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(5988): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(5988): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
E/AndroidRuntime(5988): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
E/AndroidRuntime(5988): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(5988): Caused by: java.lang.ClassNotFoundException: com.survivingwithandroid.weatherapp.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.survivingwithandroid.weatherapp-2.apk]
E/AndroidRuntime(5988): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
E/AndroidRuntime(5988): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
E/AndroidRuntime(5988): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
E/AndroidRuntime(5988): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime(5988): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
E/AndroidRuntime(5988): ... 11 more
it seems to me that you didn't download correctly the project from GitHub. If you stil experience this problem let me know and will try to download it from Github to check if there are some problems with the project i shared.
Thank you

Android ComponentInfo ClassNotFoundException on some devices

Please help to understand strange application behaviour.
In almost all devices in production everything is OK, I'm using ACRA to collect crash reports. But here is what I've got from Alpha GTR device:
ComponentInfo{com.xxxxxxxxxxx /com.xxxxxxxxxxx.xxxxActivity}: java.lang.ClassNotFoundException: com.xxxxxxxxxxx.xxxxActivity
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2108)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
at android.app.ActivityThread.access$600(ActivityThread.java:149)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:4987)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.xxxxxxxxxxx.xxxxActivity
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2099)
... 11 more
java.lang.ClassNotFoundException: com.xxxxxxxxxxx.xxxxActivity
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2099)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
at android.app.ActivityThread.access$600(ActivityThread.java:149)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:4987)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
at dalvik.system.NativeStart.main(Native Method)
So application failed to start with strange exception. I've already checked SO questions about it, and just adding libraries as Unable to instantiate activity... Caused by ClassNotFoundException doesn't help here.
Could it be some device-specific exception? My app uses Camera, Google Maps and GPS.
Maybe you have to check if GPS or Camera are supported by the device first?
LocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);

Android maps application not loading (Unexpectedly stopped error)

I am working on my first android project. i am doing a maos based application. Buty when I launch I am getting the following error "application stopped due unexpected error.
here is my code. if anything more is required plz do let me know I wil post them
import com.google.android.maps.MapView;
import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
public class map extends Activity {
/** Called when the activity is first created. */
LinearLayout linearLayout;
MapView mapView;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mapView = (MapView)findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
}
}
this is my layout xml. I have given the apikey too.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/mainlayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<com.google.android.maps.MapView
android:id="#+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="Api key"
/>
</RelativeLayout>
this is my manifest file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="rrj.map"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7" />
<application android:icon="#drawable/icon" android:label="#string/app_name">
<uses-library android:name="com.google.android.maps" />
<activity android:name=".map"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="android.permission.INTERNET">
</uses-permission>
<uses-permission
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="android.permission.ACCESS_FINE_LOCATION">
</uses-permission>
</manifest>
the logcat is down please do help me in pointing out the mistake. I don know how to read the logcat
03-11 00:47:32.856: DEBUG/AndroidRuntime(3209): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
03-11 00:47:32.856: INFO/AndroidRuntime(3209): Heap size: -Xmx18m
03-11 00:47:32.856: DEBUG/AndroidRuntime(3209): CheckJNI is OFF
03-11 00:47:32.861: DEBUG/AndroidRuntime(3209): pLocation:english, pLang: en, pRegn: GB
03-11 00:47:32.866: DEBUG/AndroidRuntime(3209): setted country_code = India
03-11 00:47:32.866: ERROR/AndroidRuntime(3209): /system/csc/sales_code.dat ==> cannot open file
03-11 00:47:32.981: DEBUG/AndroidRuntime(3209): --- registering native functions ---
03-11 00:47:33.206: DEBUG/ddm-heap(3209): Got feature list request
03-11 00:47:33.256: INFO/WynexActivity(1981): WindowOrientationChanged: 0
03-11 00:47:33.371: DEBUG/AndroidRuntime(3209): Shutting down VM
03-11 00:47:33.371: DEBUG/dalvikvm(3209): DestroyJavaVM waiting for non-daemon threads to exit
03-11 00:47:33.371: DEBUG/dalvikvm(3209): DestroyJavaVM shutting VM down
03-11 00:47:33.371: DEBUG/dalvikvm(3209): HeapWorker thread shutting down
03-11 00:47:33.371: DEBUG/dalvikvm(3209): HeapWorker thread has shut down
03-11 00:47:33.376: DEBUG/jdwp(3209): JDWP shutting down net...
03-11 00:47:33.376: INFO/dalvikvm(3209): Debugger has detached; object registry had 1 entries
03-11 00:47:33.381: DEBUG/dalvikvm(3209): VM cleaning up
03-11 00:47:33.391: ERROR/AndroidRuntime(3209): ERROR: thread attach failed
03-11 00:47:33.391: DEBUG/dalvikvm(3209): LinearAlloc 0x0 used 663292 of 5242880 (12%)
03-11 00:47:33.716: DEBUG/AndroidRuntime(3217): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
03-11 00:47:33.716: INFO/AndroidRuntime(3217): Heap size: -Xmx18m
03-11 00:47:33.716: DEBUG/AndroidRuntime(3217): CheckJNI is OFF
03-11 00:47:33.721: DEBUG/AndroidRuntime(3217): pLocation:english, pLang: en, pRegn: GB
03-11 00:47:33.726: DEBUG/AndroidRuntime(3217): setted country_code = India
03-11 00:47:33.726: ERROR/AndroidRuntime(3217): /system/csc/sales_code.dat ==> cannot open file
03-11 00:47:33.886: DEBUG/AndroidRuntime(3217): --- registering native functions ---
03-11 00:47:34.111: DEBUG/ddm-heap(3217): Got feature list request
03-11 00:47:34.281: INFO/ActivityManager(1905): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=rrj.map/.map }
03-11 00:47:34.286: DEBUG/WynexActivity(1981): ----> onSaveInstanceState()false
03-11 00:47:34.286: DEBUG/WynexActivity(1981): ----> OnPause()false
03-11 00:47:34.286: DEBUG/Wynex(1981): ----> OnPauseActivity()
03-11 00:47:34.301: INFO/ActivityManager(1905): Start proc rrj.map for activity rrj.map/.map: pid=3224 uid=10058 gids={3003}
03-11 00:47:34.326: DEBUG/AndroidRuntime(3217): Shutting down VM
03-11 00:47:34.326: DEBUG/dalvikvm(3217): DestroyJavaVM waiting for non-daemon threads to exit
03-11 00:47:34.326: DEBUG/dalvikvm(3217): DestroyJavaVM shutting VM down
03-11 00:47:34.326: DEBUG/dalvikvm(3217): HeapWorker thread shutting down
03-11 00:47:34.331: DEBUG/dalvikvm(3217): HeapWorker thread has shut down
03-11 00:47:34.331: DEBUG/jdwp(3217): JDWP shutting down net...
03-11 00:47:34.331: INFO/dalvikvm(3217): Debugger has detached; object registry had 1 entries
03-11 00:47:34.336: DEBUG/dalvikvm(3217): VM cleaning up
03-11 00:47:34.351: ERROR/AndroidRuntime(3217): ERROR: thread attach failed
03-11 00:47:34.356: DEBUG/dalvikvm(3217): LinearAlloc 0x0 used 673260 of 5242880 (12%)
03-11 00:47:34.421: DEBUG/ddm-heap(3224): Got feature list request
03-11 00:47:34.461: DEBUG/WynexView(1981): (^^) SURFACE DESTROYED
03-11 00:47:34.461: DEBUG/WynexView(1981): (^^) <CONSUMER>: AWKE COMSUMER THREAD TO STOP WORKING
03-11 00:47:34.461: ERROR/WynexView(1981): (^^) <CONSUMER>: THREAD STOP
03-11 00:47:34.471: DEBUG/WynexActivity(1981): ----> onWindowFocusChanged(false)
03-11 00:47:34.471: DEBUG/Wynex(1981): ----> OnWindowFocusChanged()
03-11 00:47:34.596: DEBUG/AndroidRuntime(3224): Shutting down VM
03-11 00:47:34.601: WARN/dalvikvm(3224): threadid=3: thread exiting with uncaught exception (group=0x4001b180)
03-11 00:47:34.601: ERROR/AndroidRuntime(3224): Uncaught handler: thread main exiting due to uncaught exception
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): java.lang.RuntimeException: Unable to start activity ComponentInfo{rrj.map/rrj.map.map}: android.view.InflateException: Binary XML file line #8: Error inflating class com.google.android.maps.MapView
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.os.Handler.dispatchMessage(Handler.java:99)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.os.Looper.loop(Looper.java:123)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.app.ActivityThread.main(ActivityThread.java:4367)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at java.lang.reflect.Method.invokeNative(Native Method)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at java.lang.reflect.Method.invoke(Method.java:521)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at dalvik.system.NativeStart.main(Native Method)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.google.android.maps.MapView
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.app.Activity.setContentView(Activity.java:1622)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at rrj.map.map.onCreate(map.java:18)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): ... 11 more
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): Caused by: java.lang.reflect.InvocationTargetException
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at com.google.android.maps.MapView.<init>(MapView.java:238)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at java.lang.reflect.Constructor.constructNative(Native Method)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): ... 21 more
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity.
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at com.google.android.maps.MapView.<init>(MapView.java:282)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): at com.google.android.maps.MapView.<init>(MapView.java:255)
03-11 00:47:34.626: ERROR/AndroidRuntime(3224): ... 25 more
What jumps out at me 1st is that map activities should extend MapActivity
Your activity must extend MapActivity and you are missing the Maps Api key in your MapView definition. You can get it here.

Categories

Resources