I am getting this very annoying error in LogCat
12-11 13:40:53.178: E/AndroidRuntime(4483): FATAL EXCEPTION: main
12-11 13:40:53.178: E/AndroidRuntime(4483): java.lang.RuntimeException: Unable to resume activity {com.vahzay.android.smstrove/com.vahzay.android.smstrove.ListMessages}: android.view.InflateException: Binary XML file line #8: Error inflating class com.google.ads.AdView
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2491)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2519)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2033)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread.access$600(ActivityThread.java:127)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1179)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.os.Handler.dispatchMessage(Handler.java:99)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.os.Looper.loop(Looper.java:137)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread.main(ActivityThread.java:4508)
12-11 13:40:53.178: E/AndroidRuntime(4483): at java.lang.reflect.Method.invokeNative(Native Method)
12-11 13:40:53.178: E/AndroidRuntime(4483): at java.lang.reflect.Method.invoke(Method.java:511)
12-11 13:40:53.178: E/AndroidRuntime(4483): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
12-11 13:40:53.178: E/AndroidRuntime(4483): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
12-11 13:40:53.178: E/AndroidRuntime(4483): at dalvik.system.NativeStart.main(Native Method)
12-11 13:40:53.178: E/AndroidRuntime(4483): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.google.ads.AdView
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:693)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.rInflate(LayoutInflater.java:741)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.inflate(LayoutInflater.java:491)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
12-11 13:40:53.178: E/AndroidRuntime(4483): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:252)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.Activity.setContentView(Activity.java:1837)
12-11 13:40:53.178: E/AndroidRuntime(4483): at com.vahzay.android.smstrove.ListMessages.onResume(ListMessages.java:650)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1159)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.Activity.performResume(Activity.java:4553)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2481)
12-11 13:40:53.178: E/AndroidRuntime(4483): ... 12 more
12-11 13:40:53.178: E/AndroidRuntime(4483): Caused by: java.lang.ClassNotFoundException: com.google.ads.AdView
12-11 13:40:53.178: E/AndroidRuntime(4483): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
12-11 13:40:53.178: E/AndroidRuntime(4483): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-11 13:40:53.178: E/AndroidRuntime(4483): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.createView(LayoutInflater.java:554)
12-11 13:40:53.178: E/AndroidRuntime(4483): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:682)
12-11 13:40:53.178: E/AndroidRuntime(4483): ... 22 more
I have included the admob-sdk-android.jar through order and import from
properties-->android-->java Build Path.
Is there something else I need to deal with to add adds in my app? My Xml file has following code
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
xmlns:tools="http://schemas.android.com/tools"
xmlns:android1="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000" >
<com.google.ads.AdView
android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="xxxx"
ads:adSize="BANNER"
ads:testDevices="TEST_EMULATOR"
ads:loadAdOnCreate="true"/> ...
I am able to resolve the problem by adding GoogleAdMobAdsSdk.jar in my project/libs folder.
Related
I'm using AndroidSlidingUpPanel and launching the Demo sample, the app crashes:
Could not find method android.support.v4.view.ViewConfigurationCompat.hasPermanentMenuKey, referenced from method android.support.v7.app.ActionBarActivityDelegateBase.openPanel**
12-11 15:52:46.621: E/AndroidRuntime(1051): FATAL EXCEPTION: main
12-11 15:52:46.621: E/AndroidRuntime(1051): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sothree.slidinguppanel.demo/com.sothree.slidinguppanel.demo.DemoActivity}: android.view.InflateException: Binary XML file line #23: Error inflating class android.support.v7.widget.Toolbar
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2295)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.ActivityThread.access$700(ActivityThread.java:159)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.os.Handler.dispatchMessage(Handler.java:99)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.os.Looper.loop(Looper.java:176)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.ActivityThread.main(ActivityThread.java:5419)
12-11 15:52:46.621: E/AndroidRuntime(1051): at java.lang.reflect.Method.invokeNative(Native Method)
12-11 15:52:46.621: E/AndroidRuntime(1051): at java.lang.reflect.Method.invoke(Method.java:525)
12-11 15:52:46.621: E/AndroidRuntime(1051): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
12-11 15:52:46.621: E/AndroidRuntime(1051): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
12-11 15:52:46.621: E/AndroidRuntime(1051): at dalvik.system.NativeStart.main(Native Method)
12-11 15:52:46.621: E/AndroidRuntime(1051): Caused by: android.view.InflateException: Binary XML file line #23: Error inflating class android.support.v7.widget.Toolbar
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.createView(LayoutInflater.java:626)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.support.v7.app.ActionBarActivityDelegateBase.setContentView(ActionBarActivityDelegateBase.java:228)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:102)
12-11 15:52:46.621: E/AndroidRuntime(1051): at com.sothree.slidinguppanel.demo.DemoActivity.onCreate(DemoActivity.java:29)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.Activity.performCreate(Activity.java:5372)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257)
12-11 15:52:46.621: E/AndroidRuntime(1051): ... 11 more
12-11 15:52:46.621: E/AndroidRuntime(1051): Caused by: java.lang.reflect.InvocationTargetException
12-11 15:52:46.621: E/AndroidRuntime(1051): at java.lang.reflect.Constructor.constructNative(Native Method)
12-11 15:52:46.621: E/AndroidRuntime(1051): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.view.LayoutInflater.createView(LayoutInflater.java:600)
12-11 15:52:46.621: E/AndroidRuntime(1051): ... 24 more
12-11 15:52:46.621: E/AndroidRuntime(1051): Caused by: java.lang.NoSuchMethodError: android.support.v4.content.ContextCompat.getDrawable
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.support.v7.internal.widget.TintManager.getDrawable(TintManager.java:133)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.support.v7.internal.widget.TintTypedArray.getDrawable(TintTypedArray.java:62)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.support.v7.widget.Toolbar.<init>(Toolbar.java:249)
12-11 15:52:46.621: E/AndroidRuntime(1051): at android.support.v7.widget.Toolbar.<init>(Toolbar.java:191)
12-11 15:52:46.621: E/AndroidRuntime(1051): ... 27 more
The third line of the error message says that in your XML file, the class android.support.v7.widget.Toolbar is not found.
Have you well import android.support.v7 library in your project?
Take a look here : https://developer.android.com/tools/support-library/setup.html
I have built an Android app that until updating the Android API, from 19 to 21, ran successfully. Now when I run the app, the login page does appear, but just as a user logs in and starts the MainActivity, the app crashes stating 'App has stopped', while the error is thrown:
12-11 17:46:21.411: E/ActivityThread(12327): Pause GC
12-11 17:46:21.411: E/ActivityThread(12327): java.lang.reflect.InvocationTargetException
12-11 17:46:21.411: E/ActivityThread(12327): at java.lang.reflect.Method.invokeNative(Native Method)
12-11 17:46:21.411: E/ActivityThread(12327): at java.lang.reflect.Method.invoke(Method.java:515)
12-11 17:46:21.411: E/ActivityThread(12327): at android.app.ActivityThread.pauseGC(ActivityThread.java:5410)
12-11 17:46:21.411: E/ActivityThread(12327): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2277)
12-11 17:46:21.411: E/ActivityThread(12327): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
12-11 17:46:21.411: E/ActivityThread(12327): at android.app.ActivityThread.access$900(ActivityThread.java:169)
12-11 17:46:21.411: E/ActivityThread(12327): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
12-11 17:46:21.411: E/ActivityThread(12327): at android.os.Handler.dispatchMessage(Handler.java:102)
12-11 17:46:21.411: E/ActivityThread(12327): at android.os.Looper.loop(Looper.java:146)
12-11 17:46:21.411: E/ActivityThread(12327): at android.app.ActivityThread.main(ActivityThread.java:5487)
12-11 17:46:21.411: E/ActivityThread(12327): at java.lang.reflect.Method.invokeNative(Native Method)
12-11 17:46:21.411: E/ActivityThread(12327): at java.lang.reflect.Method.invoke(Method.java:515)
12-11 17:46:21.411: E/ActivityThread(12327): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
12-11 17:46:21.411: E/ActivityThread(12327): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
12-11 17:46:21.411: E/ActivityThread(12327): at dalvik.system.NativeStart.main(Native Method)
12-11 17:46:21.411: E/ActivityThread(12327): Caused by: java.lang.UnsatisfiedLinkError: Native method not found: dalvik.system.VMRuntime.pauseGc:(Ljava/lang/String;)I
12-11 17:46:21.411: E/ActivityThread(12327): at dalvik.system.VMRuntime.pauseGc(Native Method)
12-11 17:46:21.411: E/ActivityThread(12327): ... 15 more
12-11 17:46:21.446: D/AndroidRuntime(12327): Shutting down VM
12-11 17:46:21.446: W/dalvikvm(12327): threadid=1: thread exiting with uncaught exception (group=0x41daec08)
12-11 17:46:21.451: E/AndroidRuntime(12327): FATAL EXCEPTION: main
12-11 17:46:21.451: E/AndroidRuntime(12327): Process: com.example.feastapp, PID: 12327
12-11 17:46:21.451: E/AndroidRuntime(12327): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.feastapp/com.example.feastapp.MainActivity}: java.lang.NullPointerException
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2334)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.ActivityThread.access$900(ActivityThread.java:169)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.os.Handler.dispatchMessage(Handler.java:102)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.os.Looper.loop(Looper.java:146)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.ActivityThread.main(ActivityThread.java:5487)
12-11 17:46:21.451: E/AndroidRuntime(12327): at java.lang.reflect.Method.invokeNative(Native Method)
12-11 17:46:21.451: E/AndroidRuntime(12327): at java.lang.reflect.Method.invoke(Method.java:515)
12-11 17:46:21.451: E/AndroidRuntime(12327): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
12-11 17:46:21.451: E/AndroidRuntime(12327): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
12-11 17:46:21.451: E/AndroidRuntime(12327): at dalvik.system.NativeStart.main(Native Method)
12-11 17:46:21.451: E/AndroidRuntime(12327): Caused by: java.lang.NullPointerException
12-11 17:46:21.451: E/AndroidRuntime(12327): at com.example.feastapp.MainActivity.onCreate(MainActivity.java:77)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.Activity.performCreate(Activity.java:5451)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
12-11 17:46:21.451: E/AndroidRuntime(12327): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
12-11 17:46:21.451: E/AndroidRuntime(12327): ... 11 more
This is a very perplexing situation as just before the update, the app ran just fine. Absolutely no changes were made to the code. At present, the login page can appear but when entering credentials and pressing send the app crashes immediately. Any Idea on how to alleviate?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I already generated API key by giving the MD5 fingureprint from here
https://code.google.com/apis/console/?noredirect#project:413913157166:access
but after running the android application i got error message Unfortunately,(ProjectName) has been stopped Android in the emulator
Need Help.. Thanks in advance
here is my logcat
t. Please make sure your kernel is compiled with file capabilities support enabled.
12-23 01:06:40.713: W/dalvikvm(1663): PR_CAPBSET_DROP 33 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
12-23 01:06:40.744: D/dalvikvm(1663): Not late-enabling CheckJNI (already on)
12-23 01:06:44.634: D/dalvikvm(1663): GC_FOR_ALLOC freed 243K, 11% free 2773K/3104K, paused 41ms, total 47ms
12-23 01:06:44.634: W/CursorWrapperInner(1663): Cursor finalized without prior close()
12-23 01:06:44.645: W/CursorWrapperInner(1663): Cursor finalized without prior close()
12-23 01:06:44.724: D/AndroidRuntime(1663): Shutting down VM
12-23 01:06:44.744: W/dalvikvm(1663): threadid=1: thread exiting with uncaught exception (group=0x41465700)
12-23 01:06:44.824: E/AndroidRuntime(1663): FATAL EXCEPTION: main
12-23 01:06:44.824: E/AndroidRuntime(1663): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.maps/com.example.maps.MainActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class com.google.android.map.MapView
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.os.Handler.dispatchMessage(Handler.java:99)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.os.Looper.loop(Looper.java:137)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.app.ActivityThread.main(ActivityThread.java:5103)
12-23 01:06:44.824: E/AndroidRuntime(1663): at java.lang.reflect.Method.invokeNative(Native Method)
12-23 01:06:44.824: E/AndroidRuntime(1663): at java.lang.reflect.Method.invoke(Method.java:525)
12-23 01:06:44.824: E/AndroidRuntime(1663): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
12-23 01:06:44.824: E/AndroidRuntime(1663): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-23 01:06:44.824: E/AndroidRuntime(1663): at dalvik.system.NativeStart.main(Native Method)
12-23 01:06:44.824: E/AndroidRuntime(1663): Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class com.google.android.map.MapView
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:707)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
12-23 01:06:44.824: E/AndroidRuntime(1663): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:267)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.app.Activity.setContentView(Activity.java:1895)
12-23 01:06:44.824: E/AndroidRuntime(1663): at com.example.maps.MainActivity.onCreate(MainActivity.java:16)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.app.Activity.performCreate(Activity.java:5133)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
12-23 01:06:44.824: E/AndroidRuntime(1663): ... 11 more
12-23 01:06:44.824: E/AndroidRuntime(1663): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.map.MapView" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.example.maps-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.maps-1, /vendor/lib, /system/lib]]
12-23 01:06:44.824: E/AndroidRuntime(1663): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
12-23 01:06:44.824: E/AndroidRuntime(1663): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-23 01:06:44.824: E/AndroidRuntime(1663): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.view.LayoutInflater.createView(LayoutInflater.java:559)
12-23 01:06:44.824: E/AndroidRuntime(1663): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
12-23 01:06:44.824: E/AndroidRuntime(1663): ... 21 more
12-23 01:06:54.994: I/Process(1663): Sending signal. PID: 1663 SIG: 9
12-23 01:08:58.434: D/dalvikvm(1820): GC_FOR_ALLOC freed 250K, 11% free 2766K/3104K, paused 67ms, total 76ms
12-23 01:08:58.434: W/CursorWrapperInner(1820): Cursor finalized without prior close()
12-23 01:08:58.464: W/CursorWrapperInner(1820): Cursor finalized without prior close()
12-23 01:08:58.624: D/AndroidRuntime(1820): Shutting down VM
12-23 01:08:58.624: W/dalvikvm(1820): threadid=1: thread exiting with uncaught exception (group=0x41465700)
12-23 01:08:58.714: E/AndroidRuntime(1820): FATAL EXCEPTION: main
12-23 01:08:58.714: E/AndroidRuntime(1820): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.maps/com.example.maps.MainActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class com.google.android.map.MapView
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.os.Handler.dispatchMessage(Handler.java:99)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.os.Looper.loop(Looper.java:137)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.app.ActivityThread.main(ActivityThread.java:5103)
12-23 01:08:58.714: E/AndroidRuntime(1820): at java.lang.reflect.Method.invokeNative(Native Method)
12-23 01:08:58.714: E/AndroidRuntime(1820): at java.lang.reflect.Method.invoke(Method.java:525)
12-23 01:08:58.714: E/AndroidRuntime(1820): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
12-23 01:08:58.714: E/AndroidRuntime(1820): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-23 01:08:58.714: E/AndroidRuntime(1820): at dalvik.system.NativeStart.main(Native Method)
12-23 01:08:58.714: E/AndroidRuntime(1820): Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class com.google.android.map.MapView
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:707)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
12-23 01:08:58.714: E/AndroidRuntime(1820): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:267)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.app.Activity.setContentView(Activity.java:1895)
12-23 01:08:58.714: E/AndroidRuntime(1820): at com.example.maps.MainActivity.onCreate(MainActivity.java:16)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.app.Activity.performCreate(Activity.java:5133)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
12-23 01:08:58.714: E/AndroidRuntime(1820): ... 11 more
12-23 01:08:58.714: E/AndroidRuntime(1820): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.map.MapView" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.example.maps-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.maps-2, /vendor/lib, /system/lib]]
12-23 01:08:58.714: E/AndroidRuntime(1820): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
12-23 01:08:58.714: E/AndroidRuntime(1820): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-23 01:08:58.714: E/AndroidRuntime(1820): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.view.LayoutInflater.createView(LayoutInflater.java:559)
12-23 01:08:58.714: E/AndroidRuntime(1820): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
12-23 01:08:58.714: E/AndroidRuntime(1820): ... 21 more
12-23 01:09:10.654: I/Process(1820): Sending signal. PID: 1820 SIG: 9
12-23 01:16:40.084: D/dalvikvm(1913): GC_FOR_ALLOC freed 229K, 11% free 2786K/3104K, paused 47ms, total 52ms
12-23 01:16:40.084: W/CursorWrapperInner(1913): Cursor finalized without prior close()
12-23 01:16:40.095: W/CursorWrapperInner(1913): Cursor finalized without prior close()
12-23 01:16:40.114: D/AndroidRuntime(1913): Shutting down VM
12-23 01:16:40.114: W/dalvikvm(1913): threadid=1: thread exiting with uncaught exception (group=0x41465700)
12-23 01:16:40.146: E/AndroidRuntime(1913): FATAL EXCEPTION: main
12-23 01:16:40.146: E/AndroidRuntime(1913): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.maps/com.example.maps.MainActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class activity
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.os.Handler.dispatchMessage(Handler.java:99)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.os.Looper.loop(Looper.java:137)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.app.ActivityThread.main(ActivityThread.java:5103)
12-23 01:16:40.146: E/AndroidRuntime(1913): at java.lang.reflect.Method.invokeNative(Native Method)
12-23 01:16:40.146: E/AndroidRuntime(1913): at java.lang.reflect.Method.invoke(Method.java:525)
12-23 01:16:40.146: E/AndroidRuntime(1913): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
12-23 01:16:40.146: E/AndroidRuntime(1913): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-23 01:16:40.146: E/AndroidRuntime(1913): at dalvik.system.NativeStart.main(Native Method)
12-23 01:16:40.146: E/AndroidRuntime(1913): Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class activity
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:707)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
12-23 01:16:40.146: E/AndroidRuntime(1913): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:267)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.app.Activity.setContentView(Activity.java:1895)
12-23 01:16:40.146: E/AndroidRuntime(1913): at com.example.maps.MainActivity.onCreate(MainActivity.java:16)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.app.Activity.performCreate(Activity.java:5133)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
12-23 01:16:40.146: E/AndroidRuntime(1913): ... 11 more
12-23 01:16:40.146: E/AndroidRuntime(1913): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.activity" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.example.maps-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.maps-1, /vendor/lib, /system/lib]]
12-23 01:16:40.146: E/AndroidRuntime(1913): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
12-23 01:16:40.146: E/AndroidRuntime(1913): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-23 01:16:40.146: E/AndroidRuntime(1913): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.view.LayoutInflater.createView(LayoutInflater.java:559)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:652)
12-23 01:16:40.146: E/AndroidRuntime(1913): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:669)
12-23 01:16:40.146: E/AndroidRuntime(1913): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:694)
12-23 01:16:40.146: E/AndroidRuntime(1913): ... 21 more
12-23 01:16:46.515: I/Process(1913): Sending signal. PID: 1913 SIG: 9
12-23 01:25:04.063: D/dalvikvm(1967): GC_FOR_ALLOC freed 232K, 11% free 2784K/3104K, paused 30ms, total 36ms
12-23 01:25:04.063: W/CursorWrapperInner(1967): Cursor finalized without prior close()
12-23 01:25:04.073: W/CursorWrapperInner(1967): Cursor finalized without prior close()
12-23 01:25:04.093: D/AndroidRuntime(1967): Shutting down VM
12-23 01:25:04.093: W/dalvikvm(1967): threadid=1: thread exiting with uncaught exception (group=0x41465700)
12-23 01:25:04.103: E/AndroidRuntime(1967): FATAL EXCEPTION: main
12-23 01:25:04.103: E/AndroidRuntime(1967): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.maps/com.example.maps.MainActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class com.google.android.map.MapView
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.os.Handler.dispatchMessage(Handler.java:99)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.os.Looper.loop(Looper.java:137)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.app.ActivityThread.main(ActivityThread.java:5103)
12-23 01:25:04.103: E/AndroidRuntime(1967): at java.lang.reflect.Method.invokeNative(Native Method)
12-23 01:25:04.103: E/AndroidRuntime(1967): at java.lang.reflect.Method.invoke(Method.java:525)
12-23 01:25:04.103: E/AndroidRuntime(1967): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
12-23 01:25:04.103: E/AndroidRuntime(1967): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-23 01:25:04.103: E/AndroidRuntime(1967): at dalvik.system.NativeStart.main(Native Method)
12-23 01:25:04.103: E/AndroidRuntime(1967): Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class com.google.android.map.MapView
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:707)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
12-23 01:25:04.103: E/AndroidRuntime(1967): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:267)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.app.Activity.setContentView(Activity.java:1895)
12-23 01:25:04.103: E/AndroidRuntime(1967): at com.example.maps.MainActivity.onCreate(MainActivity.java:16)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.app.Activity.performCreate(Activity.java:5133)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
12-23 01:25:04.103: E/AndroidRuntime(1967): ... 11 more
12-23 01:25:04.103: E/AndroidRuntime(1967): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.map.MapView" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.example.maps-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.maps-2, /vendor/lib, /system/lib]]
12-23 01:25:04.103: E/AndroidRuntime(1967): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
12-23 01:25:04.103: E/AndroidRuntime(1967): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-23 01:25:04.103: E/AndroidRuntime(1967): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.view.LayoutInflater.createView(LayoutInflater.java:559)
12-23 01:25:04.103: E/AndroidRuntime(1967): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
12-23 01:25:04.103: E/AndroidRuntime(1967): ... 21 more
12-23 01:25:22.094: I/Process(1967): Sending signal. PID: 1967 SIG: 9
12-23 01:27:40.973: D/dalvikvm(2025): GC_FOR_ALLOC freed 233K, 11% free 2783K/3104K, paused 32ms, total 38ms
12-23 01:27:40.973: W/CursorWrapperInner(2025): Cursor finalized without prior close()
12-23 01:27:40.973: W/CursorWrapperInner(2025): Cursor finalized without prior close()
12-23 01:27:41.003: D/AndroidRuntime(2025): Shutting down VM
12-23 01:27:41.003: W/dalvikvm(2025): threadid=1: thread exiting with uncaught exception (group=0x41465700)
12-23 01:27:41.023: E/AndroidRuntime(2025): FATAL EXCEPTION: main
12-23 01:27:41.023: E/AndroidRuntime(2025): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.maps/com.example.maps.MainActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class com.google.android.map.MapView
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.os.Handler.dispatchMessage(Handler.java:99)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.os.Looper.loop(Looper.java:137)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.app.ActivityThread.main(ActivityThread.java:5103)
12-23 01:27:41.023: E/AndroidRuntime(2025): at java.lang.reflect.Method.invokeNative(Native Method)
12-23 01:27:41.023: E/AndroidRuntime(2025): at java.lang.reflect.Method.invoke(Method.java:525)
12-23 01:27:41.023: E/AndroidRuntime(2025): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
12-23 01:27:41.023: E/AndroidRuntime(2025): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-23 01:27:41.023: E/AndroidRuntime(2025): at dalvik.system.NativeStart.main(Native Method)
12-23 01:27:41.023: E/AndroidRuntime(2025): Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class com.google.android.map.MapView
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:707)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
12-23 01:27:41.023: E/AndroidRuntime(2025): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:267)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.app.Activity.setContentView(Activity.java:1895)
12-23 01:27:41.023: E/AndroidRuntime(2025): at com.example.maps.MainActivity.onCreate(MainActivity.java:16)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.app.Activity.performCreate(Activity.java:5133)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
12-23 01:27:41.023: E/AndroidRuntime(2025): ... 11 more
12-23 01:27:41.023: E/AndroidRuntime(2025): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.map.MapView" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.example.maps-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.maps-1, /vendor/lib, /system/lib]]
12-23 01:27:41.023: E/AndroidRuntime(2025): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
12-23 01:27:41.023: E/AndroidRuntime(2025): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-23 01:27:41.023: E/AndroidRuntime(2025): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.view.LayoutInflater.createView(LayoutInflater.java:559)
12-23 01:27:41.023: E/AndroidRuntime(2025): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
12-23 01:27:41.023: E/AndroidRuntime(2025): ... 21 more
12-23 01:32:41.724: I/Process(2025): Sending signal. PID: 2025 SIG: 9
HERE IS MY MANIFEST
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.maps"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<uses-library android:name ="com.google.android.maps"/>
<activity
android:name="com.example.maps.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>
</application>
</manifest>
</i>
HERE IS MY ACTIVITY CLASS
package com.example.maps;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
public class MainActivity extends MapActivity {
MapView map;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
map = (MapView)findViewById(R.id.mvMainActivity);
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
#Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
HERE IS MY XML->LAYOUT FILE
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<com.google.android.map.MapView
android:id = "#+id/mvMainActivity"
android:layout_width = "fill_parent"
android:layout_height = "fill_parent"
android:clickable="true"
android:apiKey = "AIzaSyBq4zldj_kQVdwGt9ru-nWSSOJ0ORUBuFE"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/hello_world" />
</RelativeLayout>
I would recommend you update the ADK's libraries. This question's answer details how to update your libraries.
Furthermore, verify that the libraries you imported for com.google.android.maps have been added to your build path. It seems an off thing to check but working with Android, I have seen many stranger things!
Edit: As stated by one of the comments, the deprecated maps library might be the culprit. If the update does not fix the problem. Try raising the minimum version you are targeting. Legacy support is nice but often induces more problems than it solves. Unless it is of crucial importance to you, I would personally only target the latest release which I believe was API version 14 or 16.
yup as Raghunandan said you are using Google maps API V1 which is deprecated one. Follow this link for Convert it to API V2.
And also you can try this code which I got map on my emulator.
I've tried to get some data from the nasa rss ( I'm following Android HeadFirst book ) using the Simple Framework.
The problem that I face is that the application closes down automatically when the main activity is loaded.
Here is the code :
public class MainActivity extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
try {
print();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
and here is the print method:
public void print() throws Exception
{
Rss rss = new Rss();
Serializer serializer = new Persister();
File source = new File("http://www.nasa.gov/rss/dyn/image_of_the_day.rss");
serializer.read(rss, source);
TextView text = (TextView) this.findViewById(R.id.imageTitle);
text.setText(rss.channel.title);
}
logcat:
> 12-11 18:27:03.459: D/AndroidRuntime(20621): Shutting down VM
12-11 18:27:03.459: W/dalvikvm(20621): threadid=1: thread exiting with uncaught exception (group=0x400205a0)
12-11 18:27:03.469: E/AndroidRuntime(20621): FATAL EXCEPTION: main
12-11 18:27:03.469: E/AndroidRuntime(20621): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.nasadailyimage/com.example.nasadailyimage.MainActivity}: java.lang.ClassNotFoundException: com.example.nasadailyimage.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.nasadailyimage-1.apk]
12-11 18:27:03.469: E/AndroidRuntime(20621): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1743)
12-11 18:27:03.469: E/AndroidRuntime(20621): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1851)
12-11 18:27:03.469: E/AndroidRuntime(20621): at android.app.ActivityThread.access$1500(ActivityThread.java:132)
12-11 18:27:03.469: E/AndroidRuntime(20621): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
12-11 18:27:03.469: E/AndroidRuntime(20621): at android.os.Handler.dispatchMessage(Handler.java:99)
12-11 18:27:03.469: E/AndroidRuntime(20621): at android.os.Looper.loop(Looper.java:150)
12-11 18:27:03.469: E/AndroidRuntime(20621): at android.app.ActivityThread.main(ActivityThread.java:4277)
12-11 18:27:03.469: E/AndroidRuntime(20621): at java.lang.reflect.Method.invokeNative(Native Method)
12-11 18:27:03.469: E/AndroidRuntime(20621): at java.lang.reflect.Method.invoke(Method.java:507)
12-11 18:27:03.469: E/AndroidRuntime(20621): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
12-11 18:27:03.469: E/AndroidRuntime(20621): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
12-11 18:27:03.469: E/AndroidRuntime(20621): at dalvik.system.NativeStart.main(Native Method)
12-11 18:27:03.469: E/AndroidRuntime(20621): Caused by: java.lang.ClassNotFoundException: com.example.nasadailyimage.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.nasadailyimage-1.apk]
12-11 18:27:03.469: E/AndroidRuntime(20621): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
12-11 18:27:03.469: E/AndroidRuntime(20621): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
12-11 18:27:03.469: E/AndroidRuntime(20621): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
12-11 18:27:03.469: E/AndroidRuntime(20621): at android.app.Instrumentation.newActivity(Instrumentation.java:1040)
12-11 18:27:03.469: E/AndroidRuntime(20621): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1735)
12-11 18:27:03.469: E/AndroidRuntime(20621): ... 11 more
Here is the manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.nasadailyimage"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.nasadailyimage.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>
</application>
</manifest>
I've create a brand new android project. And it works
However even if I remove all the libraries I added ( simple.org) and if I comment out everything that I've added in MainActivity.java is still makes the application close down
I have been able to observe that the line:
Serializer serialezer = new Persister();
causes the error. Is the framework simple used for android applications? Does it usually cause these kind of errors?
Update
I have also tried different versions of the jar.
None seem to work
Closing Eclipse does not help whatsoever
The program only runs when the Serializer line is commented out
The line
Serializer ser = new Persister();
is what causes the error. I don't have the smallest idea weather the simple Framework is causing this somehow.
I had my environment setup on a previous machine, and I'm on a differnt MacBook. For some strange reason, I keep getting an issue with one of my classes which exend FragmentActivity. It keeps saying it can't find the FragmentActivity class, although I have the support jar in my class path, as per the image:
The detailed error message that I'm seeing is here:
10-23 23:10:16.300 26062-26062/com.testapp W/dalvikvm﹕ Unable to resolve superclass of Lcom/testapp/views/loginregistration/LoginView; (92)
10-23 23:10:16.300 26062-26062/com.testapp W/dalvikvm﹕ Link of class 'Lcom/testapp/views/loginregistration/LoginView;' failed
10-23 23:10:16.300 26062-26062/com.testapp D/AndroidRuntime﹕ Shutting down VM
10-23 23:10:16.300 26062-26062/com.testapp W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x414f8700)
10-23 23:10:16.330 26062-26062/com.testapp E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.testapp/com.testapp.views.loginregistration.LoginView}: java.lang.ClassNotFoundException: Didn't find class "com.testapp.views.loginregistration.LoginView" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.testapp-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.testapp-1, /vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2137)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.testapp.views.loginregistration.LoginView" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.testapp-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.testapp-1, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Is there someting else i'm missing?
In your IDE (as shown in your screenshot), check the 'export' box next to the classpath entry that contains the missing class.
I had a similar problem with a class from the Android Support library (Unable to resolve superclass of Lcom ... PagerAdapter). It turned out a library referenced in the .classpath needed to be exported:
From:
<classpathentry
To:
<classpathentry exported="true" ...
For Eclipse users, I fixed the problem by exporting Android Private Libraries in the Java Build Path menu.