Unable to get provider abc.xxx.Datapro: java.lang.ClassNotFoundException - android

Unable to get provider abc.xxx.Datapro: java.lang.ClassNotFoundException: Didn't find class "abc.xxx.Datapro" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
logcat
08-28 16:23:18.750: E/AndroidRuntime(2189): FATAL EXCEPTION: main
08-28 16:23:18.750: E/AndroidRuntime(2189): Process: dbd.mygovtnotification, PID: 2189
08-28 16:23:18.750: E/AndroidRuntime(2189): java.lang.RuntimeException: Unable to get provider dbd.mygovtnotification.Datapro: java.lang.ClassNotFoundException: Didn't find class "dbd.mygovtnotification.Datapro" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
08-28 16:23:18.750: E/AndroidRuntime(2189): at android.app.ActivityThread.installProvider(ActivityThread.java:4793)
08-28 16:23:18.750: E/AndroidRuntime(2189): at android.app.ActivityThread.installContentProviders(ActivityThread.java:4385)
08-28 16:23:18.750: E/AndroidRuntime(2189): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4325)
08-28 16:23:18.750: E/AndroidRuntime(2189): at android.app.ActivityThread.access$1500(ActivityThread.java:135)
08-28 16:23:18.750: E/AndroidRuntime(2189): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
08-28 16:23:18.750: E/AndroidRuntime(2189): at android.os.Handler.dispatchMessage(Handler.java:102)
08-28 16:23:18.750: E/AndroidRuntime(2189): at android.os.Looper.loop(Looper.java:136)
08-28 16:23:18.750: E/AndroidRuntime(2189): at android.app.ActivityThread.main(ActivityThread.java:5017)
08-28 16:23:18.750: E/AndroidRuntime(2189): at java.lang.reflect.Method.invokeNative(Native Method)
08-28 16:23:18.750: E/AndroidRuntime(2189): at java.lang.reflect.Method.invoke(Method.java:515)
08-28 16:23:18.750: E/AndroidRuntime(2189): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
08-28 16:23:18.750: E/AndroidRuntime(2189): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
08-28 16:23:18.750: E/AndroidRuntime(2189): at dalvik.system.NativeStart.main(Native Method)
08-28 16:23:18.750: E/AndroidRuntime(2189): Caused by: java.lang.ClassNotFoundException: Didn't find class "dbd.mygovtnotification.Datapro" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
08-28 16:23:18.750: E/AndroidRuntime(2189): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
08-28 16:23:18.750: E/AndroidRuntime(2189): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
08-28 16:23:18.750: E/AndroidRuntime(2189): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
08-28 16:23:18.750: E/AndroidRuntime(2189): at android.app.ActivityThread.installProvider(ActivityThread.java:4778)
08-28 16:23:18.750: E/AndroidRuntime(2189): ... 12 more
08-28 16:24:10.301: D/AndroidRuntime(2242): Shutting down VM
08-28 16:24:10.321: W/dalvikvm(2242): threadid=1: thread exiting with uncaught exception (group=0xb1d80b20)
08-28 16:24:10.371: E/AndroidRuntime(2242): FATAL EXCEPTION: main
08-28 16:24:10.371: E/AndroidRuntime(2242): Process: dbd.mygovtnotification, PID: 2242
08-28 16:24:10.371: E/AndroidRuntime(2242): java.lang.RuntimeException: Unable to get provider dbd.mygovtnotification.Datapro: java.lang.ClassNotFoundException: Didn't find class "dbd.mygovtnotification.Datapro" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
08-28 16:24:10.371: E/AndroidRuntime(2242): at android.app.ActivityThread.installProvider(ActivityThread.java:4793)
08-28 16:24:10.371: E/AndroidRuntime(2242): at android.app.ActivityThread.installContentProviders(ActivityThread.java:4385)
08-28 16:24:10.371: E/AndroidRuntime(2242): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4325)
08-28 16:24:10.371: E/AndroidRuntime(2242): at android.app.ActivityThread.access$1500(ActivityThread.java:135)
08-28 16:24:10.371: E/AndroidRuntime(2242): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
08-28 16:24:10.371: E/AndroidRuntime(2242): at android.os.Handler.dispatchMessage(Handler.java:102)
08-28 16:24:10.371: E/AndroidRuntime(2242): at android.os.Looper.loop(Looper.java:136)
08-28 16:24:10.371: E/AndroidRuntime(2242): at android.app.ActivityThread.main(ActivityThread.java:5017)
08-28 16:24:10.371: E/AndroidRuntime(2242): at java.lang.reflect.Method.invokeNative(Native Method)
08-28 16:24:10.371: E/AndroidRuntime(2242): at java.lang.reflect.Method.invoke(Method.java:515)
08-28 16:24:10.371: E/AndroidRuntime(2242): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
08-28 16:24:10.371: E/AndroidRuntime(2242): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
08-28 16:24:10.371: E/AndroidRuntime(2242): at dalvik.system.NativeStart.main(Native Method)
08-28 16:24:10.371: E/AndroidRuntime(2242): Caused by: java.lang.ClassNotFoundException: Didn't find class "dbd.mygovtnotification.Datapro" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
08-28 16:24:10.371: E/AndroidRuntime(2242): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
08-28 16:24:10.371: E/AndroidRuntime(2242): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
08-28 16:24:10.371: E/AndroidRuntime(2242): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
08-28 16:24:10.371: E/AndroidRuntime(2242): at android.app.ActivityThread.installProvider(ActivityThread.java:4778)
08-28 16:24:10.371: E/AndroidRuntime(2242): ... 12 more
Manifest.xml
xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dbd.mygovtnotification"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="dbd.mygovtnotification.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="dbd.mygovtnotification.permission.C2D_MESSAGE" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" android:enabled="true" android:hasCode="false">
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
</activity>
<receiver
android:name=".GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="dbd.mygovtnotification" />
</intent-filter>
</receiver>
<activity android:name="NewMainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="GcMIntentService" >
</service>
<activity android:name="TeST" >
</activity>
<provider
android:name="dbd.mygovtnotification.Datapro"
android:authorities="dbd.mygovtnotification"
android:exported="false">
</provider>
<activity android:name="ViewJOB" >
</activity>
</application>
</manifest>
by examining what other people did
cleaned projects
restarted the eclipse, phone, emulator,adb and pc.
nothing seems to help, would appreciate any help

Try using this instead:
android:name=".Datapro"
android:authorities="dbd.mygovtnotification.datapro"

if nothing works like in my case (when it was previously working ) consider creating a new project and copying files from the old one and updating references(some will be taken in care by eclipse itself )

Related

App is crashing while intending navigation drawer activity

I want to start the navigation drawer activity when pressing a button.
Here's my code:-
public void logdinScreen(View view) {
codeM = (EditText)findViewById(R.id.editText2);
if(codeM.getText().toString().equals("0000"))
{
//Toast.makeText(getBaseContext(),"LogedIn",Toast.LENGTH_LONG).show();
Intent intent2 = new Intent(OTPScreen.this,HomeScreen.class);
startActivity(intent2);
}
}
Android Manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.harpreet.btp_project" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".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>
<activity
android:name=".OTPScreen"
android:label="#string/title_activity_otpscreen" >
</activity>
<activity
android:name=".HomeScreen"
android:label="#string/title_activity_home_screen" >
</activity>
</application>
</manifest>
logcat:-
05-23 01:08:23.999 3326-3326/? D/dalvikvm﹕ Late-enabling CheckJNI
05-23 01:08:24.059 3326-3326/? E/Trace﹕ error opening trace file: No such file or directory (2)
05-23 01:08:24.059 3326-3326/? D/ActivityThread﹕ setTargetHeapUtilization:0.25
05-23 01:08:24.059 3326-3326/? D/ActivityThread﹕ setTargetHeapIdealFree:8388608
05-23 01:08:24.059 3326-3326/com.example.harpreet.btp_project D/ActivityThread﹕ setTargetHeapConcurrentStart:2097152
05-23 01:08:24.239 3326-3326/com.example.harpreet.btp_project D/dalvikvm﹕ GC_FOR_ALLOC freed 70K, 35% free 12967K/19779K, paused 21ms, total 22ms
05-23 01:08:24.259 3326-3326/com.example.harpreet.btp_project I/dalvikvm-heap﹕ Grow heap (frag case) to 29.330MB for 8294416-byte allocation
05-23 01:08:24.289 3326-3328/com.example.harpreet.btp_project D/dalvikvm﹕ GC_CONCURRENT freed 1K, 25% free 21066K/27911K, paused 12ms+1ms, total 35ms
05-23 01:08:24.429 3326-3326/com.example.harpreet.btp_project D/libEGL﹕ loaded /system/lib/egl/libEGL_adreno200.so
05-23 01:08:24.449 3326-3326/com.example.harpreet.btp_project D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_adreno200.so
05-23 01:08:24.459 3326-3326/com.example.harpreet.btp_project D/libEGL﹕ loaded /system/lib/egl/libGLESv2_adreno200.so
05-23 01:08:24.469 3326-3326/com.example.harpreet.btp_project I/Adreno200-EGL﹕ <qeglDrvAPI_eglInitialize:299>: EGL 1.4 QUALCOMM build: (Merge)
Build Date: 07/09/13 Tue
Local Branch: AU_41
Remote Branch:
Local Patches:
Reconstruct Branch:
05-23 01:08:24.529 3326-3326/com.example.harpreet.btp_project D/OpenGLRenderer﹕ Enabling debug mode 0
05-23 01:08:39.009 3326-3326/com.example.harpreet.btp_project D/AndroidRuntime﹕ Shutting down VM
05-23 01:08:39.009 3326-3326/com.example.harpreet.btp_project W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x413e2378)
05-23 01:08:39.029 3326-3326/com.example.harpreet.btp_project E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.harpreet.btp_project/com.example.harpreet.btp_project.HomeScreen}: android.view.InflateException: Binary XML file line #19: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2071)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2096)
at android.app.ActivityThread.access$600(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #19: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
at com.example.harpreet.btp_project.HomeScreen.onCreate(HomeScreen.java:39)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2035)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2096)
            at android.app.ActivityThread.access$600(ActivityThread.java:138)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:213)
            at android.app.ActivityThread.main(ActivityThread.java:4787)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.example.harpreet.btp_project.NavigationDrawerFragment.onCreateView(NavigationDrawerFragment.java:100)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1789)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:924)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1116)
at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1218)
at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2170)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:300)
at android.support.v7.app.AppCompatDelegateImplV7.callActivityOnCreateView(AppCompatDelegateImplV7.java:816)
at android.support.v7.app.AppCompatDelegateImplV11.callActivityOnCreateView(AppCompatDelegateImplV11.java:72)
at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:804)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:675)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
            at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)
            at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
            at com.example.harpreet.btp_project.HomeScreen.onCreate(HomeScreen.java:39)
            at android.app.Activity.performCreate(Activity.java:5008)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2035)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2096)
            at android.app.ActivityThread.access$600(ActivityThread.java:138)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:213)
            at android.app.ActivityThread.main(ActivityThread.java:4787)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
            at dalvik.system.NativeStart.main(Native Method)
The app is working untill i press that button. When i comment the intent part and uncomment the Toast part, it is working perfect.
Am i doing it wrong?

google map api v2 - first steps

I am new in using google map api v2.
i do every thing base on this tutorial:
Android SDK: Working with Google Maps - Application Setup
but in 5 :
Add a Map to the App
when i add fragment to may layout, i got some rendering error in my preview and show me stack overflow error.
and when I Run my code this i see this errors:
02-20 21:36:37.601 11893-11893/com.example.gmt3 I/Process﹕ Sending signal. PID: 11893 SIG: 9
02-20 21:41:30.941 12732-12732/com.example.gmt3 D/dalvikvm﹕ Late-enabling CheckJNI
02-20 21:41:31.021 12732-12732/com.example.gmt3 W/ResourceType﹕ CREATING STRING CACHE OF 44 bytes
02-20 21:41:31.041 12732-12732/com.example.gmt3 D/AndroidRuntime﹕ Shutting down VM
02-20 21:41:31.041 12732-12732/com.example.gmt3 W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41662d88)
02-20 21:41:31.051 12732-12732/com.example.gmt3 E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.gmt3, PID: 12732
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.gmt3/com.example.gmt3.MyActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2237)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:212)
at android.app.ActivityThread.main(ActivityThread.java:5137)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:297)
at android.app.Activity.setContentView(Activity.java:1929)
at com.example.gmt3.MyActivity.onCreate(MyActivity.java:14)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2201)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:212)
            at android.app.ActivityThread.main(ActivityThread.java:5137)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 5077000 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
at com.google.android.gms.common.GooglePlayServicesUtil.x(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
at com.google.android.gms.maps.internal.u.F(Unknown Source)
at com.google.android.gms.maps.internal.u.E(Unknown Source)
at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
at com.google.android.gms.maps.MapFragment$b.ju(Unknown Source)
at com.google.android.gms.maps.MapFragment$b.a(Unknown Source)
at com.google.android.gms.dynamic.a.a(Unknown Source)
at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
at android.app.Activity.onCreateView(Activity.java:4785)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:297)
            at android.app.Activity.setContentView(Activity.java:1929)
            at com.example.gmt3.MyActivity.onCreate(MyActivity.java:14)
            at android.app.Activity.performCreate(Activity.java:5231)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2201)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:212)
            at android.app.ActivityThread.main(ActivityThread.java:5137)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)
            at dalvik.system.NativeStart.main(Native Method)
02-20 21:42:01.901 13963-13963/com.example.gmt3 W/ResourceType﹕ CREATING STRING CACHE OF 44 bytes
02-20 21:42:01.921 13963-13963/com.example.gmt3 D/AndroidRuntime﹕ Shutting down VM
02-20 21:42:01.921 13963-13963/com.example.gmt3 W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41662d88)
02-20 21:44:41.511 15098-15098/com.example.gmt3 D/dalvikvm﹕ Late-enabling CheckJNI
02-20 21:44:41.641 15098-15098/com.example.gmt3 W/ResourceType﹕ CREATING STRING CACHE OF 44 bytes
02-20 21:44:41.671 15098-15098/com.example.gmt3 I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: RGURRAM_AU_LINUX_ANDROID_LNX.LA.3.5.2.2_RB1.04.04.04.087.030+PATCH[ES]_msm8974_LNX.LA.3.5.2.2_RB1__release_ENGG ()
OpenGL ES Shader Compiler Version: E031.24.00.15
Build Date: 08/12/14 Tue
Local Branch:
Remote Branch: quic/LNX.LA.3.5.2.2_rb1
Local Patches: 8b00bd16f3c1d9d35a2fa902df5e679888d2b2e3 Fixes an llvm crash with mini dEQP apk
38bad22e162dead4e008444520a0144c78a347bd Fixes a potential dEQP crash.
ce345e1c45c2ae2d1fb2cb125c8d2574f1af5f95 Rev
02-20 21:44:41.701 15098-15098/com.example.gmt3 D/OpenGLRenderer﹕ Enabling debug mode 0
02-20 21:44:41.761 15098-15098/com.example.gmt3 I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#42e245d8 time:70662662
02-20 21:51:39.711 15098-15098/com.example.gmt3 I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#42e245d8 time:71080619
02-20 21:51:45.771 16948-16948/com.example.gmt3 W/ResourceType﹕ CREATING STRING CACHE OF 44 bytes
02-20 21:51:45.811 16948-16948/com.example.gmt3 I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: RGURRAM_AU_LINUX_ANDROID_LNX.LA.3.5.2.2_RB1.04.04.04.087.030+PATCH[ES]_msm8974_LNX.LA.3.5.2.2_RB1__release_ENGG ()
OpenGL ES Shader Compiler Version: E031.24.00.15
Build Date: 08/12/14 Tue
Local Branch:
Remote Branch: quic/LNX.LA.3.5.2.2_rb1
Local Patches: 8b00bd16f3c1d9d35a2fa902df5e679888d2b2e3 Fixes an llvm crash with mini dEQP apk
38bad22e162dead4e008444520a0144c78a347bd Fixes a potential dEQP crash.
ce345e1c45c2ae2d1fb2cb125c8d2574f1af5f95 Rev
02-20 21:51:45.851 16948-16948/com.example.gmt3 D/OpenGLRenderer﹕ Enabling debug mode 0
02-20 21:51:45.921 16948-16948/com.example.gmt3 I/Timeline﹕ Timeline: Activity_idle id: android.os.BinderProxy#428164f0 time:71086820
02-20 21:52:30.821 18305-18305/com.example.gmt3 D/dalvikvm﹕ Late-enabling CheckJNI
02-20 21:52:30.911 18305-18305/com.example.gmt3 W/ResourceType﹕ CREATING STRING CACHE OF 44 bytes
02-20 21:52:30.931 18305-18305/com.example.gmt3 D/AndroidRuntime﹕ Shutting down VM
02-20 21:52:30.931 18305-18305/com.example.gmt3 W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41662d88)
02-20 21:52:30.941 18305-18305/com.example.gmt3 E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.gmt3, PID: 18305
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.gmt3/com.example.gmt3.MyActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2237)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:212)
at android.app.ActivityThread.main(ActivityThread.java:5137)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:297)
at android.app.Activity.setContentView(Activity.java:1929)
at com.example.gmt3.MyActivity.onCreate(MyActivity.java:14)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2201)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:212)
            at android.app.ActivityThread.main(ActivityThread.java:5137)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 5077000 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
at com.google.android.gms.common.GooglePlayServicesUtil.x(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
at com.google.android.gms.maps.internal.u.F(Unknown Source)
at com.google.android.gms.maps.internal.u.E(Unknown Source)
at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
at com.google.android.gms.maps.MapFragment$b.ju(Unknown Source)
at com.google.android.gms.maps.MapFragment$b.a(Unknown Source)
at com.google.android.gms.dynamic.a.a(Unknown Source)
at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
at android.app.Activity.onCreateView(Activity.java:4785)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:297)
            at android.app.Activity.setContentView(Activity.java:1929)
            at com.example.gmt3.MyActivity.onCreate(MyActivity.java:14)
            at android.app.Activity.performCreate(Activity.java:5231)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2201)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:212)
            at android.app.ActivityThread.main(ActivityThread.java:5137)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)
            at dalvik.system.NativeStart.main(Native Method)
can some one guide me about this?
pn: sorry for such a silly q.
Edit:
my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.gmt3"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="17"/>
<permission android:name="com.example.gmt3.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<uses-permission android:name="com.example.gmt3.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<application android:label="#string/app_name" android:icon="#drawable/ic_launcher">
<activity android:name="MyActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDg3mKRpkNhYeyxdrv2xjnkoS8mDt3qsmo" />
</application>
</manifest>
The answer is in the error log
The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 5077000 but found 0. You must have the following declaration within the <application> element:
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
Maybe you have only forgotten to add this refference to your manifest

Eclipse simulator keep saying Unfortunately, has stopped

08-28 05:00:23.910: D/dalvikvm(784): Not late-enabling CheckJNI
(already on) 08-28 05:00:26.950: D/AndroidRuntime(784): Shutting down
VM 08-28 05:00:26.950: W/dalvikvm(784): threadid=1: thread exiting
with uncaught exception (group=0xb3a74d70) 08-28 05:00:26.960:
E/AndroidRuntime(784): FATAL EXCEPTION: main 08-28 05:00:26.960:
E/AndroidRuntime(784): Process: com.example.geoquiz, PID: 784 08-28
05:00:26.960: E/AndroidRuntime(784): java.lang.RuntimeException:
Unable to start activity
ComponentInfo{com.example.geoquiz/com.example.geoquiz.QuizActivity}:
android.util.AndroidRuntimeException: You cannot combine swipe
dismissal and the action bar. 08-28 05:00:26.960:
E/AndroidRuntime(784): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.app.ActivityThread.access$800(ActivityThread.java:138) 08-28
05:00:26.960: E/AndroidRuntime(784): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.os.Handler.dispatchMessage(Handler.java:102) 08-28
05:00:26.960: E/AndroidRuntime(784): at
android.os.Looper.loop(Looper.java:136) 08-28 05:00:26.960:
E/AndroidRuntime(784): at
android.app.ActivityThread.main(ActivityThread.java:5026) 08-28
05:00:26.960: E/AndroidRuntime(784): at
java.lang.reflect.Method.invokeNative(Native Method) 08-28
05:00:26.960: E/AndroidRuntime(784): at
java.lang.reflect.Method.invoke(Method.java:515) 08-28 05:00:26.960:
E/AndroidRuntime(784): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
08-28 05:00:26.960: E/AndroidRuntime(784): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) 08-28
05:00:26.960: E/AndroidRuntime(784): at
dalvik.system.NativeStart.main(Native Method) 08-28 05:00:26.960:
E/AndroidRuntime(784): Caused by:
android.util.AndroidRuntimeException: You cannot combine swipe
dismissal and the action bar. 08-28 05:00:26.960:
E/AndroidRuntime(784): at
com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:275)
08-28 05:00:26.960: E/AndroidRuntime(784): at
com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2872)
08-28 05:00:26.960: E/AndroidRuntime(784): at
com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3129)
08-28 05:00:26.960: E/AndroidRuntime(784): at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:303)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.app.Activity.setContentView(Activity.java:1930) 08-28
05:00:26.960: E/AndroidRuntime(784): at
android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
08-28 05:00:26.960: E/AndroidRuntime(784): at
com.example.geoquiz.QuizActivity.onCreate(QuizActivity.java:20) 08-28
05:00:26.960: E/AndroidRuntime(784): at
android.app.Activity.performCreate(Activity.java:5242) 08-28
05:00:26.960: E/AndroidRuntime(784): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-28 05:00:26.960: E/AndroidRuntime(784): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
08-28 05:00:26.960: E/AndroidRuntime(784): ... 11 more 08-28
05:15:14.460: D/AndroidRuntime(1119): Shutting down VM 08-28
05:15:14.460: W/dalvikvm(1119): threadid=1: thread exiting with
uncaught exception (group=0xb3a74d70) 08-28 05:15:14.470:
E/AndroidRuntime(1119): FATAL EXCEPTION: main 08-28 05:15:14.470:
E/AndroidRuntime(1119): Process: com.example.geoquiz, PID: 1119 08-28
05:15:14.470: E/AndroidRuntime(1119): java.lang.RuntimeException:
Unable to instantiate application android.test.mock.MockApplication:
java.lang.ClassNotFoundException: Didn't find class
"android.test.mock.MockApplication" on path: DexPathList[[zip file
"/data/app/com.example.geoquiz-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.geoquiz-2, /system/lib]] 08-28 05:15:14.470: E/AndroidRuntime(1119): at
android.app.LoadedApk.makeApplication(LoadedApk.java:507) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
android.app.ActivityThread.handleBindApplication(ActivityThread.java:4326)
08-28 05:15:14.470: E/AndroidRuntime(1119): at
android.app.ActivityThread.access$1500(ActivityThread.java:138) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1269)
08-28 05:15:14.470: E/AndroidRuntime(1119): at
android.os.Handler.dispatchMessage(Handler.java:102) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
android.os.Looper.loop(Looper.java:136) 08-28 05:15:14.470:
E/AndroidRuntime(1119): at
android.app.ActivityThread.main(ActivityThread.java:5026) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
java.lang.reflect.Method.invokeNative(Native Method) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
java.lang.reflect.Method.invoke(Method.java:515) 08-28 05:15:14.470:
E/AndroidRuntime(1119): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
08-28 05:15:14.470: E/AndroidRuntime(1119): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
dalvik.system.NativeStart.main(Native Method) 08-28 05:15:14.470:
E/AndroidRuntime(1119): Caused by: java.lang.ClassNotFoundException:
Didn't find class "android.test.mock.MockApplication" on path:
DexPathList[[zip file
"/data/app/com.example.geoquiz-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.geoquiz-2, /system/lib]] 08-28 05:15:14.470: E/AndroidRuntime(1119): at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
08-28 05:15:14.470: E/AndroidRuntime(1119): at
java.lang.ClassLoader.loadClass(ClassLoader.java:497) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
java.lang.ClassLoader.loadClass(ClassLoader.java:457) 08-28
05:15:14.470: E/AndroidRuntime(1119): at
android.app.Instrumentation.newApplication(Instrumentation.java:975)
08-28 05:15:14.470: E/AndroidRuntime(1119): at
android.app.LoadedApk.makeApplication(LoadedApk.java:502) 08-28
05:15:14.470: E/AndroidRuntime(1119): ... 11 more 08-28 05:16:04.770:
D/AndroidRuntime(1162): Shutting down VM 08-28 05:16:04.770:
W/dalvikvm(1162): threadid=1: thread exiting with uncaught exception
(group=0xb3a74d70) 08-28 05:16:04.780: E/AndroidRuntime(1162): FATAL
EXCEPTION: main 08-28 05:16:04.780: E/AndroidRuntime(1162): Process:
com.example.geoquiz, PID: 1162 08-28 05:16:04.780:
E/AndroidRuntime(1162): java.lang.RuntimeException: Unable to
instantiate application android.test.mock.MockApplication:
java.lang.ClassNotFoundException: Didn't find class
"android.test.mock.MockApplication" on path: DexPathList[[zip file
"/data/app/com.example.geoquiz-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.geoquiz-1, /system/lib]] 08-28 05:16:04.780: E/AndroidRuntime(1162): at
android.app.LoadedApk.makeApplication(LoadedApk.java:507) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
android.app.ActivityThread.handleBindApplication(ActivityThread.java:4326)
08-28 05:16:04.780: E/AndroidRuntime(1162): at
android.app.ActivityThread.access$1500(ActivityThread.java:138) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1269)
08-28 05:16:04.780: E/AndroidRuntime(1162): at
android.os.Handler.dispatchMessage(Handler.java:102) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
android.os.Looper.loop(Looper.java:136) 08-28 05:16:04.780:
E/AndroidRuntime(1162): at
android.app.ActivityThread.main(ActivityThread.java:5026) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
java.lang.reflect.Method.invokeNative(Native Method) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
java.lang.reflect.Method.invoke(Method.java:515) 08-28 05:16:04.780:
E/AndroidRuntime(1162): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
08-28 05:16:04.780: E/AndroidRuntime(1162): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
dalvik.system.NativeStart.main(Native Method) 08-28 05:16:04.780:
E/AndroidRuntime(1162): Caused by: java.lang.ClassNotFoundException:
Didn't find class "android.test.mock.MockApplication" on path:
DexPathList[[zip file
"/data/app/com.example.geoquiz-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.geoquiz-1, /system/lib]] 08-28 05:16:04.780: E/AndroidRuntime(1162): at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
08-28 05:16:04.780: E/AndroidRuntime(1162): at
java.lang.ClassLoader.loadClass(ClassLoader.java:497) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
java.lang.ClassLoader.loadClass(ClassLoader.java:457) 08-28
05:16:04.780: E/AndroidRuntime(1162): at
android.app.Instrumentation.newApplication(Instrumentation.java:975)
08-28 05:16:04.780: E/AndroidRuntime(1162): at
android.app.LoadedApk.makeApplication(LoadedApk.java:502) 08-28
05:16:04.780: E/AndroidRuntime(1162): ... 11 more 08-28 05:21:04.870:
I/Process(1162): Sending signal. PID: 1162 SIG: 9 08-28 05:27:08.560:
D/AndroidRuntime(1286): Shutting down VM 08-28 05:27:08.560:
W/dalvikvm(1286): threadid=1: thread exiting with uncaught exception
(group=0xb3a74d70) 08-28 05:27:08.570: E/AndroidRuntime(1286): FATAL
EXCEPTION: main 08-28 05:27:08.570: E/AndroidRuntime(1286): Process:
com.example.geoquiz, PID: 1286 08-28 05:27:08.570:
E/AndroidRuntime(1286): java.lang.RuntimeException: Unable to start
activity
ComponentInfo{com.example.geoquiz/com.example.geoquiz.QuizActivity}:
android.util.AndroidRuntimeException: You cannot combine swipe
dismissal and the action bar. 08-28 05:27:08.570:
E/AndroidRuntime(1286): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.app.ActivityThread.access$800(ActivityThread.java:138) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.os.Handler.dispatchMessage(Handler.java:102) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
android.os.Looper.loop(Looper.java:136) 08-28 05:27:08.570:
E/AndroidRuntime(1286): at
android.app.ActivityThread.main(ActivityThread.java:5026) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
java.lang.reflect.Method.invokeNative(Native Method) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
java.lang.reflect.Method.invoke(Method.java:515) 08-28 05:27:08.570:
E/AndroidRuntime(1286): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
dalvik.system.NativeStart.main(Native Method) 08-28 05:27:08.570:
E/AndroidRuntime(1286): Caused by:
android.util.AndroidRuntimeException: You cannot combine swipe
dismissal and the action bar. 08-28 05:27:08.570:
E/AndroidRuntime(1286): at
com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:275)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2872)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3129)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:303)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.app.Activity.setContentView(Activity.java:1930) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
com.example.geoquiz.QuizActivity.onCreate(QuizActivity.java:20) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
android.app.Activity.performCreate(Activity.java:5242) 08-28
05:27:08.570: E/AndroidRuntime(1286): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-28 05:27:08.570: E/AndroidRuntime(1286): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
08-28 05:27:08.570: E/AndroidRuntime(1286): ... 11 more
I'm new to android, what's wrong with this?
See, this is showing exception here. You have made some mistakes in your code. This is your error:
"You cannot combine swipe dismissal and the action bar"
and if you click on this line
"android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217) 08-28 05:27:08.570: E/AndroidRuntime(1286): at "
you will get the exact error in your Java class.

Android Google Map's Demo Application - Unfortunately stopped

i want to deploy google maps into my android application. i followed a step-by-step procedure which i found it here. But when i run the application. I got "Unfortunately your application has stopped error. I followed each step in that document. please let me know the error.
here is my logcat's output
04-18 12:15:30.416: I/Process(1423): Sending signal. PID: 1423 SIG: 9
04-18 12:15:31.676: W/dalvikvm(1443): VFY: unable to resolve static field 2529 (MapAttrs) in Lcom/google/android/gms/R$styleable;
04-18 12:15:31.676: D/dalvikvm(1443): VFY: replacing opcode 0x62 at 0x000e
04-18 12:15:31.686: D/AndroidRuntime(1443): Shutting down VM
04-18 12:15:31.686: W/dalvikvm(1443): threadid=1: thread exiting with uncaught exception (group=0xb1a6cba8)
04-18 12:15:31.726: E/AndroidRuntime(1443): FATAL EXCEPTION: main
04-18 12:15:31.726: E/AndroidRuntime(1443): Process: tarun.ksr.mymap, PID: 1443
04-18 12:15:31.726: E/AndroidRuntime(1443): java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
04-18 12:15:31.726: E/AndroidRuntime(1443): at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
04-18 12:15:31.726: E/AndroidRuntime(1443): at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.app.Activity.onCreateView(Activity.java:4785)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
04-18 12:15:31.726: E/AndroidRuntime(1443): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.app.Activity.setContentView(Activity.java:1929)
04-18 12:15:31.726: E/AndroidRuntime(1443): at tarun.ksr.mymap.MainActivity.onCreate(MainActivity.java:20)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.app.Activity.performCreate(Activity.java:5231)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.app.ActivityThread.access$800(ActivityThread.java:135)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.os.Handler.dispatchMessage(Handler.java:102)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.os.Looper.loop(Looper.java:136)
04-18 12:15:31.726: E/AndroidRuntime(1443): at android.app.ActivityThread.main(ActivityThread.java:5017)
04-18 12:15:31.726: E/AndroidRuntime(1443): at java.lang.reflect.Method.invokeNative(Native Method)
04-18 12:15:31.726: E/AndroidRuntime(1443): at java.lang.reflect.Method.invoke(Method.java:515)
04-18 12:15:31.726: E/AndroidRuntime(1443): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
04-18 12:15:31.726: E/AndroidRuntime(1443): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
04-18 12:15:31.726: E/AndroidRuntime(1443): at dalvik.system.NativeStart.main(Native Method)
04-18 12:15:34.846: I/Process(1443): Sending signal. PID: 1443 SIG: 9
Here is my MainActivity.java
package tarun.ksr.mymap;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;
public class MainActivity extends Activity {
private GoogleMap mMap;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
final LatLng CIU = new LatLng(35.21843892856462, 33.41662287712097);
Marker ciu = mMap.addMarker(new MarkerOptions().position(CIU).title("My Office"));
}
#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;
}
}
MANIFEST :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="tarun.ksr.mymap"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<permission
android:name="com.example.androidmapsv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature" >
</permission>
<uses-permission android:name="com.example.androidmapsv2.permission.MAPS_RECEIVE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCfVTb5mW1c-q8RdBtX7NJJ0S1KXgkHUP0"/>
<activity
android:name="tarun.ksr.mymap.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>
Add this to the manifest-
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
Also check whether the Google Play Services SDK is configured correctly.
https://developers.google.com/maps/documentation/android/start#getting_the_google_maps_android_api_v2

Android Activity Not Found Exception Doesn't Make Sense

Okay well I'm trying to make a Live Wallapper but whenever I click on settings it force closes. Saying the activity is not found which doesn't make any sense because, I have it in the Manifest. This is really starting to bug me as I've been at it for over 2 hours.
Logcat:08-28 01:06:49.903: INFO/ActivityManager(1089): Starting activity: Intent { cmp=quotesandothers.livewallpaper.quotesandothers/quotesandothers.livewallpaper.quotesandothers (has extras) }
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): FATAL EXCEPTION: main
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): java.lang.IllegalStateException: Could not execute method of the activity
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.view.View$1.onClick(View.java:2072)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.view.View.performClick(View.java:2408)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.view.View$PerformClick.run(View.java:8816)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.os.Handler.handleCallback(Handler.java:587)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.os.Handler.dispatchMessage(Handler.java:92)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.os.Looper.loop(Looper.java:123)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.ActivityThread.main(ActivityThread.java:4627)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at java.lang.reflect.Method.invokeNative(Native Method)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at java.lang.reflect.Method.invoke(Method.java:521)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at dalvik.system.NativeStart.main(Native Method)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): Caused by: java.lang.reflect.InvocationTargetException
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at com.android.wallpaper.livepicker.LiveWallpaperPreview.configureLiveWallpaper(LiveWallpaperPreview.java:113)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at java.lang.reflect.Method.invokeNative(Native Method)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at java.lang.reflect.Method.invoke(Method.java:521)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.view.View$1.onClick(View.java:2067)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): ... 11 more
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {quotesandothers.livewallpaper.quotesandothers/quotesandothers.livewallpaper.quotesandothers}; have you declared this activity in your AndroidManifest.xml?
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.Activity.startActivityForResult(Activity.java:2817)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): at android.app.Activity.startActivity(Activity.java:2923)
08-28 01:06:49.934: ERROR/AndroidRuntime(15221): ... 15 more
Manifest:`
</application>
<uses-sdk android:minSdkVersion="7" />
<uses-feature android:name="android.software.live_wallpaper" />
`
Your code starting an Activity. You have to mention this Activity in your AndroidManifest.xml.
like:
<activity android:name="your.package.name.ActivityClassName">
</activity>
Here is part of interest:
ERROR/AndroidRuntime(15221): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {quotesandothers.livewallpaper.quotesandothers/quotesandothers.livewallpaper.quotesandothers}; have you declared this activity in your AndroidManifest.xml? 08-28

Categories

Resources