I try to run google map from this page https://developers.google.com/maps/documentation/android/start#getting_the_google_maps_android_api_v2
This is my
.java page
package com.findyourtaxihere.taxi;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
This is Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.findyourtaxihere.taxi"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<permission
android:name="com.vogella.android.locationapi.maps.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="com.vogella.android.locationapi.maps.permission.MAPS_RECEIVE" />
<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" />
<application
android:allowBackup="true"
android:icon="#drawable/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>
<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.my api"
android:value="my api"/>
</application>
</manifest>
my activity main
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment"/>
when run my app , it shows error like this stops unfortunately , and i'm new for android please help me !
log
02-02 19:03:54.871: I/Process(284): Sending signal. PID: 284 SIG: 9
02-02 19:04:00.491: D/AndroidRuntime(307): Shutting down VM
02-02 19:04:00.491: W/dalvikvm(307): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
02-02 19:04:00.511: E/AndroidRuntime(307): FATAL EXCEPTION: main
02-02 19:04:00.511: E/AndroidRuntime(307): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.findyourtaxihere.taxi/com.findyourtaxihere.taxi.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.os.Looper.loop(Looper.java:123)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-02 19:04:00.511: E/AndroidRuntime(307): at java.lang.reflect.Method.invokeNative(Native Method)
02-02 19:04:00.511: E/AndroidRuntime(307): at java.lang.reflect.Method.invoke(Method.java:521)
02-02 19:04:00.511: E/AndroidRuntime(307): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-02 19:04:00.511: E/AndroidRuntime(307): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-02 19:04:00.511: E/AndroidRuntime(307): at dalvik.system.NativeStart.main(Native Method)
02-02 19:04:00.511: E/AndroidRuntime(307): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-02 19:04:00.511: E/AndroidRuntime(307): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.Activity.setContentView(Activity.java:1647)
02-02 19:04:00.511: E/AndroidRuntime(307): at com.findyourtaxihere.taxi.MainActivity.onCreate(MainActivity.java:13)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
02-02 19:04:00.511: E/AndroidRuntime(307): ... 11 more
02-02 19:04:00.511: E/AndroidRuntime(307): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/com.findyourtaxihere.taxi-2.apk]
02-02 19:04:00.511: E/AndroidRuntime(307): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
02-02 19:04:00.511: E/AndroidRuntime(307): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
02-02 19:04:00.511: E/AndroidRuntime(307): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:544)
02-02 19:04:00.511: E/AndroidRuntime(307): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
02-02 19:04:00.511: E/AndroidRuntime(307): ... 19 more
02-02 19:09:36.841: I/dalvikvm(334): Could not find method com.findyourtaxihere.taxi.MainActivity.getFragmentManager, referenced from method com.findyourtaxihere.taxi.MainActivity.onCreate
02-02 19:09:36.841: W/dalvikvm(334): VFY: unable to resolve virtual method 12505: Lcom/findyourtaxihere/taxi/MainActivity;.getFragmentManager ()Landroid/app/FragmentManager;
02-02 19:09:36.841: D/dalvikvm(334): VFY: replacing opcode 0x6e at 0x0009
02-02 19:09:36.852: D/dalvikvm(334): VFY: dead code 0x000c-0019 in Lcom/findyourtaxihere/taxi/MainActivity;.onCreate (Landroid/os/Bundle;)V
02-02 19:09:36.922: D/AndroidRuntime(334): Shutting down VM
02-02 19:09:36.922: W/dalvikvm(334): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
02-02 19:09:36.942: E/AndroidRuntime(334): FATAL EXCEPTION: main
02-02 19:09:36.942: E/AndroidRuntime(334): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.findyourtaxihere.taxi/com.findyourtaxihere.taxi.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.os.Looper.loop(Looper.java:123)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-02 19:09:36.942: E/AndroidRuntime(334): at java.lang.reflect.Method.invokeNative(Native Method)
02-02 19:09:36.942: E/AndroidRuntime(334): at java.lang.reflect.Method.invoke(Method.java:521)
02-02 19:09:36.942: E/AndroidRuntime(334): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-02 19:09:36.942: E/AndroidRuntime(334): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-02 19:09:36.942: E/AndroidRuntime(334): at dalvik.system.NativeStart.main(Native Method)
02-02 19:09:36.942: E/AndroidRuntime(334): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-02 19:09:36.942: E/AndroidRuntime(334): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.Activity.setContentView(Activity.java:1647)
02-02 19:09:36.942: E/AndroidRuntime(334): at com.findyourtaxihere.taxi.MainActivity.onCreate(MainActivity.java:18)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
02-02 19:09:36.942: E/AndroidRuntime(334): ... 11 more
02-02 19:09:36.942: E/AndroidRuntime(334): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/com.findyourtaxihere.taxi-1.apk]
02-02 19:09:36.942: E/AndroidRuntime(334): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
02-02 19:09:36.942: E/AndroidRuntime(334): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
02-02 19:09:36.942: E/AndroidRuntime(334): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:544)
02-02 19:09:36.942: E/AndroidRuntime(334): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
02-02 19:09:36.942: E/AndroidRuntime(334): ... 19 more
02-02 19:09:40.241: I/Process(334): Sending signal. PID: 334 SIG: 9
02-02 19:15:23.312: I/dalvikvm(370): Could not find method com.findyourtaxihere.taxi.MainActivity.getFragmentManager, referenced from method com.findyourtaxihere.taxi.MainActivity.onCreate
02-02 19:15:23.312: W/dalvikvm(370): VFY: unable to resolve virtual method 12505: Lcom/findyourtaxihere/taxi/MainActivity;.getFragmentManager ()Landroid/app/FragmentManager;
02-02 19:15:23.312: D/dalvikvm(370): VFY: replacing opcode 0x6e at 0x0009
02-02 19:15:23.322: D/dalvikvm(370): VFY: dead code 0x000c-0019 in Lcom/findyourtaxihere/taxi/MainActivity;.onCreate (Landroid/os/Bundle;)V
02-02 19:15:23.392: D/AndroidRuntime(370): Shutting down VM
02-02 19:15:23.392: W/dalvikvm(370): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
02-02 19:15:23.422: E/AndroidRuntime(370): FATAL EXCEPTION: main
02-02 19:15:23.422: E/AndroidRuntime(370): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.findyourtaxihere.taxi/com.findyourtaxihere.taxi.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.os.Looper.loop(Looper.java:123)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-02 19:15:23.422: E/AndroidRuntime(370): at java.lang.reflect.Method.invokeNative(Native Method)
02-02 19:15:23.422: E/AndroidRuntime(370): at java.lang.reflect.Method.invoke(Method.java:521)
02-02 19:15:23.422: E/AndroidRuntime(370): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-02 19:15:23.422: E/AndroidRuntime(370): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-02 19:15:23.422: E/AndroidRuntime(370): at dalvik.system.NativeStart.main(Native Method)
02-02 19:15:23.422: E/AndroidRuntime(370): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-02 19:15:23.422: E/AndroidRuntime(370): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.Activity.setContentView(Activity.java:1647)
02-02 19:15:23.422: E/AndroidRuntime(370): at com.findyourtaxihere.taxi.MainActivity.onCreate(MainActivity.java:18)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
02-02 19:15:23.422: E/AndroidRuntime(370): ... 11 more
02-02 19:15:23.422: E/AndroidRuntime(370): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/com.findyourtaxihere.taxi-2.apk]
02-02 19:15:23.422: E/AndroidRuntime(370): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
02-02 19:15:23.422: E/AndroidRuntime(370): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
02-02 19:15:23.422: E/AndroidRuntime(370): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:544)
02-02 19:15:23.422: E/AndroidRuntime(370): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
02-02 19:15:23.422: E/AndroidRuntime(370): ... 19 more
02-02 19:15:26.542: I/Process(370): Sending signal. PID: 370 SIG: 9
02-02 19:18:15.771: I/dalvikvm(397): Could not find method com.findyourtaxihere.taxi.MainActivity.getFragmentManager, referenced from method com.findyourtaxihere.taxi.MainActivity.onCreate
02-02 19:18:15.771: W/dalvikvm(397): VFY: unable to resolve virtual method 12506: Lcom/findyourtaxihere/taxi/MainActivity;.getFragmentManager ()Landroid/app/FragmentManager;
02-02 19:18:15.771: D/dalvikvm(397): VFY: replacing opcode 0x6e at 0x0009
02-02 19:18:15.782: D/dalvikvm(397): VFY: dead code 0x000c-005e in Lcom/findyourtaxihere/taxi/MainActivity;.onCreate (Landroid/os/Bundle;)V
02-02 19:18:15.821: D/AndroidRuntime(397): Shutting down VM
02-02 19:18:15.821: W/dalvikvm(397): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
02-02 19:18:15.851: E/AndroidRuntime(397): FATAL EXCEPTION: main
02-02 19:18:15.851: E/AndroidRuntime(397): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.findyourtaxihere.taxi/com.findyourtaxihere.taxi.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.os.Looper.loop(Looper.java:123)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-02 19:18:15.851: E/AndroidRuntime(397): at java.lang.reflect.Method.invokeNative(Native Method)
02-02 19:18:15.851: E/AndroidRuntime(397): at java.lang.reflect.Method.invoke(Method.java:521)
02-02 19:18:15.851: E/AndroidRuntime(397): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-02 19:18:15.851: E/AndroidRuntime(397): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-02 19:18:15.851: E/AndroidRuntime(397): at dalvik.system.NativeStart.main(Native Method)
02-02 19:18:15.851: E/AndroidRuntime(397): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-02 19:18:15.851: E/AndroidRuntime(397): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.Activity.setContentView(Activity.java:1647)
02-02 19:18:15.851: E/AndroidRuntime(397): at com.findyourtaxihere.taxi.MainActivity.onCreate(MainActivity.java:20)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
02-02 19:18:15.851: E/AndroidRuntime(397): ... 11 more
02-02 19:18:15.851: E/AndroidRuntime(397): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/com.findyourtaxihere.taxi-1.apk]
02-02 19:18:15.851: E/AndroidRuntime(397): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
02-02 19:18:15.851: E/AndroidRuntime(397): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
02-02 19:18:15.851: E/AndroidRuntime(397): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:544)
02-02 19:18:15.851: E/AndroidRuntime(397): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
02-02 19:18:15.851: E/AndroidRuntime(397): ... 19 more
02-02 19:22:23.441: D/AndroidRuntime(453): Shutting down VM
02-02 19:22:23.441: W/dalvikvm(453): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
02-02 19:22:23.471: E/AndroidRuntime(453): FATAL EXCEPTION: main
02-02 19:22:23.471: E/AndroidRuntime(453): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.findyourtaxihere.taxi/com.findyourtaxihere.taxi.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.os.Looper.loop(Looper.java:123)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-02 19:22:23.471: E/AndroidRuntime(453): at java.lang.reflect.Method.invokeNative(Native Method)
02-02 19:22:23.471: E/AndroidRuntime(453): at java.lang.reflect.Method.invoke(Method.java:521)
02-02 19:22:23.471: E/AndroidRuntime(453): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-02 19:22:23.471: E/AndroidRuntime(453): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-02 19:22:23.471: E/AndroidRuntime(453): at dalvik.system.NativeStart.main(Native Method)
02-02 19:22:23.471: E/AndroidRuntime(453): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-02 19:22:23.471: E/AndroidRuntime(453): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.Activity.setContentView(Activity.java:1647)
02-02 19:22:23.471: E/AndroidRuntime(453): at com.findyourtaxihere.taxi.MainActivity.onCreate(MainActivity.java:16)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
02-02 19:22:23.471: E/AndroidRuntime(453): ... 11 more
02-02 19:22:23.471: E/AndroidRuntime(453): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/com.findyourtaxihere.taxi-1.apk]
02-02 19:22:23.471: E/AndroidRuntime(453): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
02-02 19:22:23.471: E/AndroidRuntime(453): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
02-02 19:22:23.471: E/AndroidRuntime(453): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:544)
02-02 19:22:23.471: E/AndroidRuntime(453): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
02-02 19:22:23.471: E/AndroidRuntime(453): ... 19 more
02-02 19:27:23.551: I/Process(453): Sending signal. PID: 453 SIG: 9
You need to set your min SDK to 11 so the code can only be run on devices where Activity knows how to inflate fragment tags.
Or just use the v4 support library and change your activity to extend FragmentActivity.
Related
I'm trying to start a new Activity, android. this is creating following error.
Note: i have updated the new activity in manifest
Logcat
06-27 18:00:39.543: D/AndroidRuntime(908): Shutting down VM
06-27 18:00:39.543: W/dalvikvm(908): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
06-27 18:00:39.563: E/AndroidRuntime(908): FATAL EXCEPTION: main
06-27 18:00:39.563: E/AndroidRuntime(908): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dipl.smpm.smpm/com.dipl.smpm.smpm.UpdateTask}: android.view.InflateException: Binary XML file line #15: Error inflating class button
06-27 18:00:39.563: E/AndroidRuntime(908): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.os.Handler.dispatchMessage(Handler.java:99)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.os.Looper.loop(Looper.java:123)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.app.ActivityThread.main(ActivityThread.java:4627)
06-27 18:00:39.563: E/AndroidRuntime(908): at java.lang.reflect.Method.invokeNative(Native Method)
06-27 18:00:39.563: E/AndroidRuntime(908): at java.lang.reflect.Method.invoke(Method.java:521)
06-27 18:00:39.563: E/AndroidRuntime(908): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-27 18:00:39.563: E/AndroidRuntime(908): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-27 18:00:39.563: E/AndroidRuntime(908): at dalvik.system.NativeStart.main(Native Method)
06-27 18:00:39.563: E/AndroidRuntime(908): Caused by: android.view.InflateException: Binary XML file line #15: Error inflating class button
06-27 18:00:39.563: E/AndroidRuntime(908): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
06-27 18:00:39.563: E/AndroidRuntime(908): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.app.Activity.setContentView(Activity.java:1647)
06-27 18:00:39.563: E/AndroidRuntime(908): at com.dipl.smpm.smpm.UpdateTask.onCreate(UpdateTask.java:11)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-27 18:00:39.563: E/AndroidRuntime(908): ... 11 more
06-27 18:00:39.563: E/AndroidRuntime(908): Caused by: java.lang.ClassNotFoundException: android.view.button in loader dalvik.system.PathClassLoader[/data/app/com.dipl.smpm.smpm-2.apk]
06-27 18:00:39.563: E/AndroidRuntime(908): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
06-27 18:00:39.563: E/AndroidRuntime(908): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
06-27 18:00:39.563: E/AndroidRuntime(908): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:544)
06-27 18:00:39.563: E/AndroidRuntime(908): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
06-27 18:00:39.563: E/AndroidRuntime(908): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
It seems that You have defined Your Button inside the xml layout as
<button
android:layout_width="fill_parent"
..........
/>
but You have to write a capital b
<Button
android:layout_width="fill_parent"
............
/>
This is what the line says inside Error Message
Caused by: android.view.InflateException: Binary XML file line #15: Error inflating class button <--- You wrote button, but it has to be Button
I have created one java class and one layout with image button. When I set content view it throws runtime exception.
Error:
02-02 17:46:39.558: E/AndroidRuntime(954): FATAL EXCEPTION: main
02-02 17:46:39.558: E/AndroidRuntime(954): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.oceans/com.oceans.LettersScreenActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
02-02 17:46:39.558: E/AndroidRuntime(954): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
02-02 17:46:39.558: E/AndroidRuntime(954): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
02-02 17:46:39.558: E/AndroidRuntime(954): at android.app.ActivityThread.access$600(ActivityThread.java:130)
02-02 17:46:39.558: E/AndroidRuntime(954): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
02-02 17:46:39.558: E/AndroidRuntime(954): at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 17:46:39.558: E/AndroidRuntime(954): at android.os.Looper.loop(Looper.java:137)
02-02 17:46:39.558: E/AndroidRuntime(954): at android.app.ActivityThread.main(ActivityThread.java:4745)
02-02 17:46:39.558: E/AndroidRuntime(954): at java.lang.reflect.Method.invokeNative(Native Method)
02-02 17:46:39.558: E/AndroidRuntime(954): at java.lang.reflect.Method.invoke(Method.java:511)
02-02 17:46:39.558: E/AndroidRuntime(954): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
02-02 17:46:39.558: E/AndroidRuntime(954): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
02-02 17:46:39.558: E/AndroidRuntime(954): at dalvik.system.NativeStart.main(Native Method)
02-02 17:46:39.558: E/AndroidRuntime(954): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
02-02 17:46:39.558: E/AndroidRuntime(954): at android.view.LayoutInflater.createView(LayoutInflater.java:613)
02-02 17:46:39.558: E/AndroidRuntime(954): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
02-02 17:46:39.558: E/AndroidRuntime(954): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
02-02 17:46:39.558: E/AndroidRuntime(954): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
02-02 17:46:39.558: E/AndroidRuntime(954): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
02-02 17:46:39.558: E/AndroidRuntime(954): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
02-02 17:46:39.558: E/AndroidRuntime(954): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
02-02 17:46:39.558: E/AndroidRuntime(954): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
Xml Layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/letters_bg" >
<ImageButton
android:id="#+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="49dp"
android:src="#drawable/leftsignpost" />
</RelativeLayout>
Java Class Code :
public class LettersScreenActivity extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.letters_screen); // error is here
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
}
}
So what is the problem?
Why it is throwing runtime exception ??
I've tried this code ...Its really working fine ... please check your Image and manifest file
There are no any obvious problems in the code provided, should run? At least does for me (the drawables are mine, of course).
Check if you have the referenced resources letters_bg and leftsignpost in place. These must be under res/drawable . Clean the project. Try to provide the longer stack trace.
I am new to android and developing an application that uses the google maps API.
while running the application I have the error :
the application has stopped unexpectedly
Here's what I have in the logcat file :
07-11 01:38:25.751: E/AndroidRuntime(401): FATAL EXCEPTION: main
07-11 01:38:25.751: E/AndroidRuntime(401): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.training.surveyproject/com.training.surveyproject.SurveyActivity}: java.lang.ClassNotFoundException: com.training.surveyproject.SurveyActivity in loader dalvik.system.PathClassLoader[/data/app/com.training.surveyproject-2.apk]
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.os.Handler.dispatchMessage(Handler.java:99)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.os.Looper.loop(Looper.java:123)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-11 01:38:25.751: E/AndroidRuntime(401): at java.lang.reflect.Method.invokeNative(Native Method)
07-11 01:38:25.751: E/AndroidRuntime(401): at java.lang.reflect.Method.invoke(Method.java:521)
07-11 01:38:25.751: E/AndroidRuntime(401): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-11 01:38:25.751: E/AndroidRuntime(401): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-11 01:38:25.751: E/AndroidRuntime(401): at dalvik.system.NativeStart.main(Native Method)
07-11 01:38:25.751: E/AndroidRuntime(401): Caused by: java.lang.ClassNotFoundException: com.training.surveyproject.SurveyActivity in loader dalvik.system.PathClassLoader[/data/app/com.training.surveyproject-2.apk]
07-11 01:38:25.751: E/AndroidRuntime(401): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
07-11 01:38:25.751: E/AndroidRuntime(401): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
07-11 01:38:25.751: E/AndroidRuntime(401): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
07-11 01:38:25.751: E/AndroidRuntime(401): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
07-11 01:38:25.751: E/AndroidRuntime(401): ... 11 more
thank you
You must add the activity SurveyActivity to your AndroidManifest.xml file.
You may have also forgotten to add the Google Map Library to the manifest:
<application>
<uses-library android:name="com.google.android.maps" />
</application>
When I try to run my app on an emulator, my app comes up with an error message saying
The app has stopped unexpectedly. Please try again."
How do I fix this?
Here is my code:
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.DOLEnterprises.GTA5Guide"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="4" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name= "com.google.ads.AdActivity"
android:configChanges= "keyboard|keyboardHidden|orientation"
></activity>
<activity
android:name=".GTA5GuideActivity"
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>
The "Appname"Activity.java:
package com.DOLEnterprises.GTA5Guide;
import android.app.Activity;
import android.os.Bundle;
public class GTA5GuideActivity extends Activity {
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
Main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads= "http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:scaleType="center"
android:src="#drawable/gtaapp" />
<com.google.ads.AdView android:id= "#+id/ad"
android:layout_width="wrap_content"
android:layout_height= "wrap_content"
ads:adUnitId= "soon"
ads:loadAdOnCreate= "a14f8315a6c11bf"
ads:adSize="BANNER"
/>
</LinearLayout>
The Logcat thing:
04-10 08:23:55.424: D/dalvikvm(224): GC freed 510 objects / 46816 bytes in 75ms
04-10 08:23:55.534: D/AndroidRuntime(224): Shutting down VM
04-10 08:23:55.534: W/dalvikvm(224): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
04-10 08:23:55.534: E/AndroidRuntime(224): Uncaught handler: thread main exiting due to uncaught exception
04-10 08:23:55.554: E/AndroidRuntime(224): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.DOLEnterprises.GTA5Guide/com.DOLEnterprises.GTA5Guide.GTA5GuideActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class com.google.ads.AdView
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.os.Looper.loop(Looper.java:123)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.ActivityThread.main(ActivityThread.java:4363)
04-10 08:23:55.554: E/AndroidRuntime(224): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 08:23:55.554: E/AndroidRuntime(224): at java.lang.reflect.Method.invoke(Method.java:521)
04-10 08:23:55.554: E/AndroidRuntime(224): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-10 08:23:55.554: E/AndroidRuntime(224): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-10 08:23:55.554: E/AndroidRuntime(224): at dalvik.system.NativeStart.main(Native Method)
04-10 08:23:55.554: E/AndroidRuntime(224): Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class com.google.ads.AdView
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-10 08:23:55.554: E/AndroidRuntime(224): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.Activity.setContentView(Activity.java:1622)
04-10 08:23:55.554: E/AndroidRuntime(224): at com.DOLEnterprises.GTA5Guide.GTA5GuideActivity.onCreate(GTA5GuideActivity.java:11)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
04-10 08:23:55.554: E/AndroidRuntime(224): ... 11 more
04-10 08:23:55.554: E/AndroidRuntime(224): Caused by: java.lang.ClassNotFoundException: com.google.ads.AdView in loader dalvik.system.PathClassLoader#44e8ca48
04-10 08:23:55.554: E/AndroidRuntime(224): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
04-10 08:23:55.554: E/AndroidRuntime(224): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-10 08:23:55.554: E/AndroidRuntime(224): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
04-10 08:23:55.554: E/AndroidRuntime(224): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
04-10 08:23:55.554: E/AndroidRuntime(224): ... 20 more
04-10 08:23:55.584: I/dalvikvm(224): threadid=7: reacting to signal 3
04-10 08:23:55.584: E/dalvikvm(224): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
04-10 08:24:22.804: D/dalvikvm(231): GC freed 537 objects / 47832 bytes in 68ms
04-10 08:24:22.913: D/AndroidRuntime(231): Shutting down VM
04-10 08:24:22.913: W/dalvikvm(231): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
04-10 08:24:22.913: E/AndroidRuntime(231): Uncaught handler: thread main exiting due to uncaught exception
04-10 08:24:22.933: E/AndroidRuntime(231): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.DOLEnterprises.GTA5Guide/com.DOLEnterprises.GTA5Guide.GTA5GuideActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class com.google.ads.AdView
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.os.Looper.loop(Looper.java:123)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.ActivityThread.main(ActivityThread.java:4363)
04-10 08:24:22.933: E/AndroidRuntime(231): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 08:24:22.933: E/AndroidRuntime(231): at java.lang.reflect.Method.invoke(Method.java:521)
04-10 08:24:22.933: E/AndroidRuntime(231): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-10 08:24:22.933: E/AndroidRuntime(231): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-10 08:24:22.933: E/AndroidRuntime(231): at dalvik.system.NativeStart.main(Native Method)
04-10 08:24:22.933: E/AndroidRuntime(231): Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class com.google.ads.AdView
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-10 08:24:22.933: E/AndroidRuntime(231): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.Activity.setContentView(Activity.java:1622)
04-10 08:24:22.933: E/AndroidRuntime(231): at com.DOLEnterprises.GTA5Guide.GTA5GuideActivity.onCreate(GTA5GuideActivity.java:11)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
04-10 08:24:22.933: E/AndroidRuntime(231): ... 11 more
04-10 08:24:22.933: E/AndroidRuntime(231): Caused by: java.lang.ClassNotFoundException: com.google.ads.AdView in loader dalvik.system.PathClassLoader#44e8ca28
04-10 08:24:22.933: E/AndroidRuntime(231): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
04-10 08:24:22.933: E/AndroidRuntime(231): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-10 08:24:22.933: E/AndroidRuntime(231): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
04-10 08:24:22.933: E/AndroidRuntime(231): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
04-10 08:24:22.933: E/AndroidRuntime(231): ... 20 more
04-10 08:24:22.953: I/dalvikvm(231): threadid=7: reacting to signal 3
04-10 08:24:22.953: E/dalvikvm(231): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
04-10 08:24:31.884: D/dalvikvm(237): GC freed 564 objects / 48880 bytes in 92ms
04-10 08:24:31.993: D/AndroidRuntime(237): Shutting down VM
04-10 08:24:31.993: W/dalvikvm(237): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
04-10 08:24:32.003: E/AndroidRuntime(237): Uncaught handler: thread main exiting due to uncaught exception
04-10 08:24:32.023: E/AndroidRuntime(237): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.DOLEnterprises.GTA5Guide/com.DOLEnterprises.GTA5Guide.GTA5GuideActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class com.google.ads.AdView
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.os.Handler.dispatchMessage(Handler.java:99)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.os.Looper.loop(Looper.java:123)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.ActivityThread.main(ActivityThread.java:4363)
04-10 08:24:32.023: E/AndroidRuntime(237): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 08:24:32.023: E/AndroidRuntime(237): at java.lang.reflect.Method.invoke(Method.java:521)
04-10 08:24:32.023: E/AndroidRuntime(237): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-10 08:24:32.023: E/AndroidRuntime(237): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-10 08:24:32.023: E/AndroidRuntime(237): at dalvik.system.NativeStart.main(Native Method)
04-10 08:24:32.023: E/AndroidRuntime(237): Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class com.google.ads.AdView
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-10 08:24:32.023: E/AndroidRuntime(237): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.Activity.setContentView(Activity.java:1622)
04-10 08:24:32.023: E/AndroidRuntime(237): at com.DOLEnterprises.GTA5Guide.GTA5GuideActivity.onCreate(GTA5GuideActivity.java:11)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
04-10 08:24:32.023: E/AndroidRuntime(237): ... 11 more
04-10 08:24:32.023: E/AndroidRuntime(237): Caused by: java.lang.ClassNotFoundException: com.google.ads.AdView in loader dalvik.system.PathClassLoader#44e8ca28
04-10 08:24:32.023: E/AndroidRuntime(237): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
04-10 08:24:32.023: E/AndroidRuntime(237): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-10 08:24:32.023: E/AndroidRuntime(237): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
04-10 08:24:32.023: E/AndroidRuntime(237): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
04-10 08:24:32.023: E/AndroidRuntime(237): ... 20 more
04-10 08:24:32.043: I/dalvikvm(237): threadid=7: reacting to signal 3
04-10 08:24:32.043: E/dalvikvm(237): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
---EDIT---
Are you sure you have downloaded the "Ad" library and included it in your project? Class not found suggests that you have not successfully linked it to your project. Also try rebuilding your project by following the steps below .
Try cleaning your project... Project > Clean > Choose your Project > Ok
Rerun your project.
it seems that error is caused due to Typos or casting ...... Check carefully for Typos and casting ....... check for library folder name ....
check out this
android:configChanges requieres all parameters to show ads in application
change the SDK version to 14 of your Application
mention it in your AndroidManifest.xml file
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
i got following strange exception on only andorid simulator 2.0
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.markupartist.android.example.pulltorefresh/com.markupartist.android.example.pulltorefresh.PullToRefreshActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class com.markupartist.android.widget.PullToRefreshListView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class com.markupartist.android.widget.PullToRefreshListView
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
at android.app.Activity.setContentView(Activity.java:1647)
at com.markupartist.android.example.pulltorefresh.PullToRefreshActivity.onCreate(PullToRefresh Activity.java:21)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at com.markupartist.android.widget.PullToRefreshListView. (PullToRefreshListView.java:54)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 21 more
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
at android.content.res.Resources.getValue(Resources.java:892)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:1869)
at android.content.res.Resources.getLayout(Resources.java:731)
at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.markupartist.android.widget.PullToRefreshListView.init(PullToRefreshListView.java:80)
... 25 more
when i tested on andorid 1.6 , 2.01,2.1,2.2,2.3 ,4.0 it works completely,
is this a simulator bug of 2.0
please give me some information about this
Thanks