Android Error inflating class com.actionbarsherlock.internal.widget.ActionBarContainer - android

Recently I've added ActionBarSherlock to my android project. After adding it and testing application on AVD version 4.1 everything was fine, but launching application at 2.3.3 gives the next type of errors when starting activity at setContentView:
> 04-05 18:55:03.277: E/AndroidRuntime(659): FATAL EXCEPTION: main
04-05 18:55:03.277: E/AndroidRuntime(659): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fitness.calculator/com.fitness.calculator.ProportionsActivity}: android.view.InflateException: Binary XML file line #26: Error inflating class com.actionbarsherlock.internal.widget.ActionBarContainer
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.os.Looper.loop(Looper.java:123)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.ActivityThread.main(ActivityThread.java:3683)
04-05 18:55:03.277: E/AndroidRuntime(659): at java.lang.reflect.Method.invokeNative(Native Method)
04-05 18:55:03.277: E/AndroidRuntime(659): at java.lang.reflect.Method.invoke(Method.java:507)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-05 18:55:03.277: E/AndroidRuntime(659): at dalvik.system.NativeStart.main(Native Method)
04-05 18:55:03.277: E/AndroidRuntime(659): Caused by: android.view.InflateException: Binary XML file line #26: Error inflating class com.actionbarsherlock.internal.widget.ActionBarContainer
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.actionbarsherlock.internal.ActionBarSherlockCompat.generateLayout(ActionBarSherlockCompat.java:1045)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.actionbarsherlock.internal.ActionBarSherlockCompat.installDecor(ActionBarSherlockCompat.java:915)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:849)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.actionbarsherlock.app.SherlockActivity.setContentView(SherlockActivity.java:229)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.fitness.calculator.MainMenuActivity.onCreate(MainMenuActivity.java:45)
04-05 18:55:03.277: E/AndroidRuntime(659): at com.fitness.calculator.ProportionsActivity.onCreate(ProportionsActivity.java:90)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
04-05 18:55:03.277: E/AndroidRuntime(659): ... 11 more
04-05 18:55:03.277: E/AndroidRuntime(659): Caused by: java.lang.reflect.InvocationTargetException
04-05 18:55:03.277: E/AndroidRuntime(659): at java.lang.reflect.Constructor.constructNative(Native Method)
04-05 18:55:03.277: E/AndroidRuntime(659): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
04-05 18:55:03.277: E/AndroidRuntime(659): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
04-05 18:55:03.277: E/AndroidRuntime(659): ... 24 more
04-05 18:55:03.277: E/AndroidRuntime(659): Caused by: java.lang.NoSuchMethodError: com.actionbarsherlock.internal.widget.ActionBarContainer.setBackground
04-05 18:55:03.277: E/AndroidRuntime(659): at com.actionbarsherlock.internal.widget.ActionBarContainer.<init>(ActionBarContainer.java:58)
04-05 18:55:03.277: E/AndroidRuntime(659): ... 27 more
Does anybody have an idea what could cause that type of error? Any ideas? I can't find a solution for this problem.

I fixed this problem by re-adding clear ActionBarSherlock library. First time I have fixed all warnings in library, and that caused the problem. So don't try to fix warnings in ActionBarSherlock. Hope this will help somebody.

Related

Nokia-X NokiaNotificationMessaging error-> java.lang.NoClassDefFoundError: com.nokia.push.PushRegistrar

Hi i tried NOKIA NOTIFICATION MESSAGING in android but i face the following error
LOG:
04-05 13:43:07.801: E/AndroidRuntime(1042): FATAL EXCEPTION: main
04-05 13:43:07.801: E/AndroidRuntime(1042): java.lang.NoClassDefFoundError: com.nokia.push.PushRegistrar
04-05 13:43:07.801: E/AndroidRuntime(1042): at com.example.nokiapush.NotificationsManager.<init>(NotificationsManager.java:68)
04-05 13:43:07.801: E/AndroidRuntime(1042): at com.example.nokiapush.NotificationsManager.getInstance(NotificationsManager.java:46)
04-05 13:43:07.801: E/AndroidRuntime(1042): at com.example.nokiapush.MainActivity.onCreate(MainActivity.java:65)
04-05 13:43:07.801: E/AndroidRuntime(1042): at android.app.Activity.performCreate(Activity.java:5180)
04-05 13:43:07.801: E/AndroidRuntime(1042): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
04-05 13:43:07.801: E/AndroidRuntime(1042): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2031)
04-05 13:43:07.801: E/AndroidRuntime(1042): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092)
04-05 13:43:07.801: E/AndroidRuntime(1042): at android.app.ActivityThread.access$600(ActivityThread.java:133)
04-05 13:43:07.801: E/AndroidRuntime(1042): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
04-05 13:43:07.801: E/AndroidRuntime(1042): at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 13:43:07.801: E/AndroidRuntime(1042): at android.os.Looper.loop(Looper.java:137)
04-05 13:43:07.801: E/AndroidRuntime(1042): at android.app.ActivityThread.main(ActivityThread.java:4807)
04-05 13:43:07.801: E/AndroidRuntime(1042): at java.lang.reflect.Method.invokeNative(Native Method)
04-05 13:43:07.801: E/AndroidRuntime(1042): at java.lang.reflect.Method.invoke(Method.java:511)
04-05 13:43:07.801: E/AndroidRuntime(1042): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
04-05 13:43:07.801: E/AndroidRuntime(1042): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:559)
04-05 13:43:07.801: E/AndroidRuntime(1042): at dalvik.system.NativeStart.main(Native Method)
Make sure that you are also exporting that library. If you are not exporting, library is only available at build time. Select Build path properties from eclipse (if using that) and from "Order and Export" tab select push jar to be exported. If it is not visible there check that you are exporting private libraries and dependencies.
Make also sure that you are running your app in Android emulator that is having Nokia X image (build target is Nokia X)

Unfortunately,(ProjectName) has been stopped Android [closed]

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.

Implementing GreenDroid afterwards

I just added the GreenDroid Library into my Application. I extended the startview with GDActivity and added the NFFApplication and added into the Manifest under the application tag android:name=".logic.NFFApplication".
NFFAplication:
public class NFFApplication extends GDApplication {
#Override
public Class<?> getHomeActivityClass() {
return NFFApplication.class;
}
#Override
public Intent getMainApplicationIntent() {
return new Intent(NFFApplication.this,MainView.class);
}
}
Login Activity:
public class LoginView extends GDActivity {
private ProgressDialog pd = null;
Editor editor = null;
#Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setTitle("Movie");
setActionBarContentView(R.layout.loginlayout);
LogCat:
04-05 16:12:16.714: E/AndroidRuntime(443): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.korn.nff/com.korn.nff.view.LoginView}: android.view.InflateException: Binary XML file line #27: Error inflating class greendroid.widget.ActionBar
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.os.Looper.loop(Looper.java:123)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.ActivityThread.main(ActivityThread.java:4363)
04-05 16:12:16.714: E/AndroidRuntime(443): at java.lang.reflect.Method.invokeNative(Native Method)
04-05 16:12:16.714: E/AndroidRuntime(443): at java.lang.reflect.Method.invoke(Method.java:521)
04-05 16:12:16.714: E/AndroidRuntime(443): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-05 16:12:16.714: E/AndroidRuntime(443): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-05 16:12:16.714: E/AndroidRuntime(443): at dalvik.system.NativeStart.main(Native Method)
04-05 16:12:16.714: E/AndroidRuntime(443): Caused by: android.view.InflateException: Binary XML file line #27: Error inflating class greendroid.widget.ActionBar
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-05 16:12:16.714: E/AndroidRuntime(443): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.Activity.setContentView(Activity.java:1622)
04-05 16:12:16.714: E/AndroidRuntime(443): at greendroid.app.GDActivity.ensureLayout(GDActivity.java:187)
04-05 16:12:16.714: E/AndroidRuntime(443): at greendroid.app.GDActivity.getActionBar(GDActivity.java:265)
04-05 16:12:16.714: E/AndroidRuntime(443): at greendroid.app.GDActivity.setTitle(GDActivity.java:256)
04-05 16:12:16.714: E/AndroidRuntime(443): at com.korn.nff.view.LoginView.onCreate(LoginView.java:39)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
04-05 16:12:16.714: E/AndroidRuntime(443): ... 11 more
04-05 16:12:16.714: E/AndroidRuntime(443): Caused by: java.lang.reflect.InvocationTargetException
04-05 16:12:16.714: E/AndroidRuntime(443): at greendroid.widget.ActionBar.<init>(ActionBar.java:130)
04-05 16:12:16.714: E/AndroidRuntime(443): at java.lang.reflect.Constructor.constructNative(Native Method)
04-05 16:12:16.714: E/AndroidRuntime(443): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
04-05 16:12:16.714: E/AndroidRuntime(443): ... 24 more
04-05 16:12:16.714: E/AndroidRuntime(443): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi/title_bar_shadow.9.png from drawable resource ID #0x0
04-05 16:12:16.714: E/AndroidRuntime(443): at android.content.res.Resources.loadDrawable(Resources.java:1710)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.View.<init>(View.java:1850)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.View.<init>(View.java:1799)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.view.ViewGroup.<init>(ViewGroup.java:284)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.widget.LinearLayout.<init>(LinearLayout.java:92)
04-05 16:12:16.714: E/AndroidRuntime(443): at greendroid.widget.ActionBar.<init>(ActionBar.java:134)
04-05 16:12:16.714: E/AndroidRuntime(443): ... 28 more
04-05 16:12:16.714: E/AndroidRuntime(443): Caused by: java.io.FileNotFoundException: res/drawable-hdpi/title_bar_shadow.9.png
04-05 16:12:16.714: E/AndroidRuntime(443): at android.content.res.AssetManager.openNonAssetNative(Native Method)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.content.res.AssetManager.openNonAsset(AssetManager.java:390)
04-05 16:12:16.714: E/AndroidRuntime(443): at android.content.res.Resources.loadDrawable(Resources.java:1702)
I'm not 100% sure if this is the issue, but can it be that you've forgotten to override the theme? Greendroid needs a custom theme for the application to run.
Here's the line in the greendroid documentation:
You finally need to make your project use the GreenDroid base theme. In your AndroidManifest.xml, go to the application tag and add android:theme="#style/Theme.GreenDroid" as a new attribute.
Steps you have to follow:
Download the GreenDroid library on your computer with a simple: git
clone http://github.com/cyrilmottier/GreenDroid.git. As usual, Git
will clone the GreenDroid repository and create a folder GreenDroid
that contains a 3 folders:
GreenDroid: the core library. This is the code that will be mostly linked to your code
GreenDroid-GoogleAPIs: GreenDroid's extension including Google APIs related features (GDMapActivity for instance)
GDCatalog: the demonstration application. This project contains a lot of snippet of code showing you how to use GreenDroid.
Since May 2010, the ADT plugin added an amazing new feature: the
ability to work with library projects. Using GreenDroid consists on
applying the GreenDroid project as a library to your application. A
complete description on how to use library projects is given on the
Android documentation website. Make sure your development
environment uses the latest tools and platforms, since older
releases of the tools and platforms do not support building with
library project.
In case you want to use some Google APIs features, make sure you are
using the GreenDroid-GoogleAPIs library. GreenDroid-GoogleAPIs is
based on GreenDroid. As a result, you don't need to link GreenDroid
as an Android library to your project. By default, the GreenDroid
theme inherits from #android:style/Theme. If your project inherits
from a different theme, you'll have to modify the GreenDroid library
on your own (and do that everytime you are updating GreenDroid as
updating deletes all of your changes - still working on a way to
overcome that problem). Open the res/values/gd_themes.xml and
replace the parent theme #android:style/Theme with your own theme.
A lot of GreenDroid's feature (GDActivity, GDListActivity or
GDTabActivity for instance) requires your application to be a
GDApplication so make sure your application is a GDApplication
class. In order to do that, simply add
android:name="greendroid.app.GDApplication (where
greendroid.app.GDApplication may be replaced by your own class that
inherits from GDApplication) in the application tag of your
AndroidManifest.xml.
You finally need to make your project use the GreenDroid base theme.
In your AndroidManifest.xml, go to the application tag and add
android:theme="#style/Theme.GreenDroid" as a new attribute.

eclipse adt 17 and the libs folder

Ok so i update to eclipse adt to version 17 and I get this error
04-05 12:28:55.810: E/AndroidRuntime(5470): FATAL EXCEPTION: main
04-05 12:28:55.810: E/AndroidRuntime(5470): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.galeola.agentis/com.galeola.agentis.activity.GestionaleActivity}: java.lang.ClassNotFoundException: com.galeola.agentis.activity.GestionaleActivity in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/com.galeola.agentis-1.apk]
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1742)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1834)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.ActivityThread.access$500(ActivityThread.java:122)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1027)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.os.Looper.loop(Looper.java:132)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.ActivityThread.main(ActivityThread.java:4126)
04-05 12:28:55.810: E/AndroidRuntime(5470): at java.lang.reflect.Method.invokeNative(Native Method)
04-05 12:28:55.810: E/AndroidRuntime(5470): at java.lang.reflect.Method.invoke(Method.java:491)
04-05 12:28:55.810: E/AndroidRuntime(5470): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
04-05 12:28:55.810: E/AndroidRuntime(5470): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
04-05 12:28:55.810: E/AndroidRuntime(5470): at dalvik.system.NativeStart.main(Native Method)
04-05 12:28:55.810: E/AndroidRuntime(5470): Caused by: java.lang.ClassNotFoundException: com.galeola.agentis.activity.GestionaleActivity in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/com.galeola.agentis-1.apk]
04-05 12:28:55.810: E/AndroidRuntime(5470): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:251)
04-05 12:28:55.810: E/AndroidRuntime(5470): at java.lang.ClassLoader.loadClass(ClassLoader.java:540)
04-05 12:28:55.810: E/AndroidRuntime(5470): at java.lang.ClassLoader.loadClass(ClassLoader.java:500)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.Instrumentation.newActivity(Instrumentation.java:1022)
04-05 12:28:55.810: E/AndroidRuntime(5470): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1733)
04-05 12:28:55.810: E/AndroidRuntime(5470): ... 11 more
however if i move my libraries to /libs i can start the applications, but with the libraries in /libs javadoc and javasources stops working, while if they are not in /libs javadoc and javasource works, so I don't understand why.
Have a look at Xavier Ducrohet's answers here. But basically, with adt17 you cannot attach Javadoc to your dependencies.
For non library projects:
As mentioned in the original question comment 8 in this android issue fixes the build, runtime and javadoc issues, albeit by way of a kludge.
Unfortunately Ant builds are broken. To fix Ant builds which use Proguard, move jars to lib as described in comment 8 and to ant.properties add:
jar.libs.dir=lib
and to proguard.cfg add:
-injars lib
The second addition is necessary to fix runtime crashes.
I've not tested this for projects that use instrumentation or emma tasks, but it seems OK for non-library projects where you want both an Eclipse and an Ant build.
Maybe the ADK update has messed-up with your project's build-path. Try removing the JAR and add it again to your libs folder, add it to your Build Path and do a Clean Project.
check my Question once -- New android SDK 17 issue
Ok so this is the bug and the solution is comment #8 http://code.google.com/p/android/issues/detail?id=27490#c8
Well, after hours of research , I found a simple solution.
Click on your Android Project
Select Properties
Select Java Build
Path Select Order and Export
Check all your references
Thats all !

Error while executing notepad example

I am testing the example given on http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html.
I have followed the steps as mentioned in the tutorial. The application is successfully launched in the emulator
But when i click on the menu button error comes
When i check in eclipse console it does not show any error.
When i open DDMS perspective in eclipse and go to the File Explorer. Inside File Explorer when i go to the data/data/com.android.demo.notepad1/. I see two folders one showing 5120 size.
Under Log Cat following error is coming:
04-05 16:19:07.267: ERROR/AndroidRuntime(345): FATAL EXCEPTION: main
04-05 16:19:07.267: ERROR/AndroidRuntime(345): android.content.res.Resources$NotFoundException: String resource ID #0x7f040002
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.content.res.Resources.getText(Resources.java:201)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.content.res.Resources.getString(Resources.java:254)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.view.menu.MenuBuilder.add(MenuBuilder.java:397)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.demo.notepad1.Notepadv1.onCreateOptionsMenu(Notepadv1.java:45)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.app.Activity.onCreatePanelMenu(Activity.java:2158)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:323)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.policy.impl.PhoneWindow.onKeyDownPanel(PhoneWindow.java:568)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.policy.impl.PhoneWindow.onKeyDown(PhoneWindow.java:1210)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1668)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2560)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2535)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.view.ViewRoot.handleMessage(ViewRoot.java:1867)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.os.Looper.loop(Looper.java:123)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at android.app.ActivityThread.main(ActivityThread.java:3683)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at java.lang.reflect.Method.invokeNative(Native Method)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at java.lang.reflect.Method.invoke(Method.java:507)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-05 16:19:07.267: ERROR/AndroidRuntime(345): at dalvik.system.NativeStart.main(Native Method)
04-05 16:19:07.366: WARN/ActivityManager(67): Force finishing activity com.android.demo.notepad1/.Notepadv1
04-05 16:19:07.926: WARN/ActivityManager(67): Activity pause timeout for HistoryRecord{405525f0 com.android.demo.notepad1/.Notepadv1}
04-05 16:19:19.540: WARN/ActivityManager(67): Activity destroy timeout for HistoryRecord{405525f0 com.android.demo.notepad1/.Notepadv1}
04-05 16:20:39.455: DEBUG/SntpClient(67): request time failed: java.net.SocketException: Address family not supported by protocol
04-05 16:24:11.534: INFO/Process(345): Sending signal. PID: 345 SIG: 9
04-05 16:24:12.428: ERROR/InputDispatcher(67): channel '406a5ed8 com.android.demo.notepad1/com.android.demo.notepad1.Notepadv1 (server)' ~ Consumer closed input channel or an error occurred. events=0x8
04-05 16:24:12.468: ERROR/InputDispatcher(67): channel '406a5ed8 com.android.demo.notepad1/com.android.demo.notepad1.Notepadv1 (server)' ~ Channel is unrecoverably broken and will be disposed!
04-05 16:24:12.572: INFO/ActivityManager(67): Process com.android.demo.notepad1 (pid 345) has died.
04-05 16:24:12.719: INFO/WindowManager(67): WIN DEATH: Window{406a5ed8 com.android.demo.notepad1/com.android.demo.notepad1.Notepadv1 paused=false}
Please help me trace out the reason for such error
Thanks
Pankaj
I have resolved the issue. Actually when i imported the project there was drawable folder along with drawable-hdpi, drawable-mdpi and drawable-ldpi folder.It was causing the conflict. I have removed the drawable folder and put the image which was in it to the hdpi,mdpi & ldpi folders. Now when i run the application, it works as expected.
I was having this problem also. I decided to try deleting the drawable-hdpi, drawable-ldpi, and drawable-mdpi directories. This didn't work. However, when diffing all the files in my solution versus the Notepadv1Solution, I noticed there seems to be a discrepancy in one of the xml files. On the notepad excercise 1 site under step 4, the xml for notepad_list.xml is written as
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ListView android:id="#android:id/list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:id="#android:id/empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/no_notes"/>
</LinearLayout>
However, in the Notepadv1Solution, this same file is written as
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ListView android:id="#id/android:list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:id="#id/android:empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/no_notes"/>
</LinearLayout>
When I replaced the code from the site with the code from the solution, it started working.

Categories

Resources