我收到以下运行时错误....有人可以告诉我出了什么问题..
02-21 13:21:01.352 6672-6672/? E/Trace: error opening trace file: No such file or directory (2)
02-21 13:21:01.392 6672-6672/aravindaby.myapp123 W/LocaleUtil: locale = en_IN
02-21 13:21:01.412 6672-6672/aravindaby.myapp123 W/LocaleUtil: scriptSubtag = Latn
02-21 13:21:01.482 6672-6672/aravindaby.myapp123 W/LocaleUtil: locale = en_IN
02-21 13:21:01.492 6672-6672/aravindaby.myapp123 W/LocaleUtil: scriptSubtag = Latn
02-21 13:21:02.042 6672-6672/aravindaby.myapp123 I/ActivityThread: Pub aravindaby.myapp123.google_measurement_service: com.google.android.gms.measurement.AppMeasurementContentProvider
02-21 13:21:02.102 6672-6672/aravindaby.myapp123 E/dalvikvm: Could not find class 'android.os.UserManager', referenced from method com.google.android.gms.common.zze.zzaq
02-21 13:21:02.102 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve check-cast 281 (Landroid/os/UserManager;) in Lcom/google/android/gms/common/zze;
02-21 13:21:02.102 6672-6672/aravindaby.myapp123 E/dalvikvm: Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.zze.zzb
02-21 13:21:02.102 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve check-cast 26 (Landroid/app/AppOpsManager;) in Lcom/google/android/gms/common/zze;
02-21 13:21:02.102 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve virtual method 542: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
02-21 13:21:02.222 6672-6672/aravindaby.myapp123 I/GMPM: App measurement is starting up, version: 8487
02-21 13:21:02.222 6672-6672/aravindaby.myapp123 I/GMPM: To enable debug logging run: adb shell setprop log.tag.GMPM VERBOSE
02-21 13:21:02.332 6672-6672/aravindaby.myapp123 E/GMPM: GoogleService failed to initialize, status: 10, Missing an expected resource: 'R.string.google_app_id' for initializing Google services. Possible causes are missing google-services.json or com.google.gms.google-services gradle plugin.
02-21 13:21:02.332 6672-6672/aravindaby.myapp123 E/GMPM: Scheduler not set. Not logging error/warn.
02-21 13:21:02.352 6672-6673/aravindaby.myapp123 D/dalvikvm: GC_CONCURRENT freed 241K, 7% free 6190K/6599K, paused 15ms+24ms, total 143ms
02-21 13:21:02.352 6672-6672/aravindaby.myapp123 D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 15ms
02-21 13:21:02.402 6672-6721/aravindaby.myapp123 E/GMPM: Uploading is not possible. App measurement disabled
02-21 13:21:02.422 6672-6672/aravindaby.myapp123 I/loadLabel: ComponentInfo.java loadLabel
02-21 13:21:02.432 6672-6672/aravindaby.myapp123 I/loadLabel: ComponentInfo packageName isaravindaby.myapp123
02-21 13:21:02.582 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve virtual method 239: Landroid/app/Notification$Builder;.setLocalOnly (Z)Landroid/app/Notification$Builder;
02-21 13:21:02.582 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve instance field 18
02-21 13:21:02.612 6672-6672/aravindaby.myapp123 I/zzad: Making Creator dynamically
02-21 13:21:02.612 6672-6672/aravindaby.myapp123 W/LocaleUtil: locale = en_IN
02-21 13:21:02.612 6672-6672/aravindaby.myapp123 W/LocaleUtil: scriptSubtag = Latn
02-21 13:21:02.852 6672-6673/aravindaby.myapp123 D/dalvikvm: GC_CONCURRENT freed 224K, 7% free 6493K/6919K, paused 20ms+23ms, total 75ms
02-21 13:21:03.082 6672-6673/aravindaby.myapp123 D/dalvikvm: GC_CONCURRENT freed 149K, 5% free 6855K/7175K, paused 18ms+14ms, total 98ms
02-21 13:21:03.082 6672-6672/aravindaby.myapp123 D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 5ms
02-21 13:21:03.312 6672-6673/aravindaby.myapp123 D/dalvikvm: GC_CONCURRENT freed 154K, 5% free 7233K/7559K, paused 24ms+3ms, total 122ms
02-21 13:21:03.312 6672-6672/aravindaby.myapp123 D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 45ms
02-21 13:21:03.932 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve virtual method 141: Landroid/app/Notification$Builder;.setLocalOnly (Z)Landroid/app/Notification$Builder;
02-21 13:21:03.932 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve instance field 10
02-21 13:21:03.952 6672-6672/aravindaby.myapp123 E/dalvikvm: Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.nb.a
02-21 13:21:03.992 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve check-cast 27 (Landroid/app/AppOpsManager;) in Lcom/google/android/gms/common/nb;
02-21 13:21:04.002 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve virtual method 424: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
02-21 13:21:04.142 6672-6672/aravindaby.myapp123 E/dalvikvm: Could not find class 'android.os.UserManager', referenced from method com.google.android.gms.common.nb.p
02-21 13:21:04.152 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve check-cast 225 (Landroid/os/UserManager;) in Lcom/google/android/gms/common/nb;
02-21 13:21:04.152 6672-6673/aravindaby.myapp123 D/dalvikvm: GC_CONCURRENT freed 170K, 5% free 7589K/7943K, paused 13ms+101ms, total 359ms
02-21 13:21:04.172 6672-6672/aravindaby.myapp123 D/ChimeraCfgMgr: Reading stored module config
02-21 13:21:04.252 6672-6672/aravindaby.myapp123 D/ChimeraCfgMgr: Loading module com.google.android.gms.maps from APK /data/data/com.google.android.gms/app_chimera/chimera-module-root/module-eadf3a03a14c8741cdcafd8c1812c44afdd347da/MapsModule.apk
02-21 13:21:04.262 6672-6672/aravindaby.myapp123 D/ChimeraModuleLdr: Loading module APK /data/data/com.google.android.gms/app_chimera/chimera-module-root/module-eadf3a03a14c8741cdcafd8c1812c44afdd347da/MapsModule.apk
02-21 13:21:04.362 6672-6672/aravindaby.myapp123 D/ChimeraFileApk: Primary ABI of requesting process is armeabi-v7a
02-21 13:21:04.362 6672-6672/aravindaby.myapp123 D/ChimeraFileApk: Classloading successful, but code may not be optimized. It will either run in fallback (interpreted mode) or the odex has been found and isDexOptNeeded is misreporting a failure.
02-21 13:21:04.372 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve static field 119 (SUPPORTED_64_BIT_ABIS) in Landroid/os/Build;
02-21 13:21:04.372 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve static field 118 (SUPPORTED_32_BIT_ABIS) in Landroid/os/Build;
02-21 13:21:04.372 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve static field 119 (SUPPORTED_64_BIT_ABIS) in Landroid/os/Build;
02-21 13:21:04.372 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve static field 120 (SUPPORTED_ABIS) in Landroid/os/Build;
02-21 13:21:04.412 6672-6672/aravindaby.myapp123 W/LocaleUtil: locale = en_IN
02-21 13:21:04.422 6672-6672/aravindaby.myapp123 W/LocaleUtil: scriptSubtag = Latn
02-21 13:21:04.452 6672-6672/aravindaby.myapp123 W/LocaleUtil: locale = en_IN
02-21 13:21:04.452 6672-6672/aravindaby.myapp123 W/LocaleUtil: scriptSubtag = Latn
02-21 13:21:04.692 6672-6672/aravindaby.myapp123 I/Google Maps Android API: Google Play services client version: 8487000
02-21 13:21:04.702 6672-6672/aravindaby.myapp123 I/Google Maps Android API: Google Play services package version: 8489070
02-21 13:21:04.842 6672-6672/aravindaby.myapp123 E/dalvikvm: Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.mw.a
02-21 13:21:04.842 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve check-cast 14 (Landroid/app/AppOpsManager;) in Lcom/google/android/gms/common/mw;
02-21 13:21:04.842 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve virtual method 118: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
02-21 13:21:04.842 6672-6672/aravindaby.myapp123 E/dalvikvm: Could not find class 'android.os.UserManager', referenced from method com.google.android.gms.common.mw.a
02-21 13:21:04.842 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve check-cast 115 (Landroid/os/UserManager;) in Lcom/google/android/gms/common/mw;
02-21 13:21:05.292 6672-6673/aravindaby.myapp123 D/dalvikvm: GC_CONCURRENT freed 265K, 6% free 7889K/8327K, paused 13ms+3ms, total 180ms
02-21 13:21:05.292 6672-6672/aravindaby.myapp123 D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 33ms
02-21 13:21:06.482 6672-6672/aravindaby.myapp123 W/dalvikvm: VFY: unable to resolve virtual method 1641: Landroid/widget/RelativeLayout$LayoutParams;.setMarginStart (I)V
02-21 13:21:06.642 6672-6673/aravindaby.myapp123 D/dalvikvm: GC_CONCURRENT freed 333K, 7% free 8214K/8775K, paused 21ms+14ms, total 102ms
02-21 13:21:06.682 6672-6672/aravindaby.myapp123 W/ApplicationContext: Unable to create external cache directory
02-21 13:21:06.692 6672-6672/aravindaby.myapp123 W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x411da498)
02-21 13:21:06.692 6672-6672/aravindaby.myapp123 E/test: Exception
02-21 13:21:06.722 6672-6672/aravindaby.myapp123 E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{aravindaby.myapp123/aravindaby.myapp123.MainActivity}: android.view.InflateException: Binary XML file line #31: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2062)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2087)
at android.app.ActivityThread.access$600(ActivityThread.java:133)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1198)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4793)
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:808)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:575)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #31: 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 com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
at android.app.Activity.setContentView(Activity.java:1867)
at aravindaby.myapp123.MainActivity.onCreate(MainActivity.java:32)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2026)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2087)
at android.app.ActivityThread.access$600(ActivityThread.java:133)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1198)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4793)
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:808)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:575)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.google.maps.api.android.lib6.gmm6.m.ad.a(Unknown Source)
at com.google.maps.api.android.lib6.gmm6.c.h.a(Unknown Source)
at com.google.maps.api.android.lib6.gmm6.c.y.a(Unknown Source)
at com.google.maps.api.android.lib6.e.bd.a(Unknown Source)
at com.google.maps.api.android.lib6.e.ev.a(Unknown Source)
at com.google.maps.api.android.lib6.e.z.a(Unknown Source)
at com.google.maps.api.android.lib6.e.y.a(Unknown Source)
at com.google.android.gms.maps.internal.u.onTransact(SourceFile:107)
at android.os.Binder.transact(Binder.java:326)
at com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment$zza.onCreateView(Unknown Source)
at com.google.android.gms.dynamic.zza$4.zzb(Unknown Source)
at com.google.android.gms.dynamic.zza.zza(Unknown Source)
at com.google.android.gms.dynamic.zza.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1036)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1226)
at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1328)
at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2284)
at android.support.v4.app.FragmentController.onCreateView(FragmentController.java:111)
at android.support.v4.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:314)
at android.support.v4.app.BaseFragmentActivityHoneycomb.onCreateView(BaseFragmentActivityHoneycomb.java:31)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:79)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
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 com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
at android.app.Activity.setContentView(Activity.java:1867)
at aravindaby.myapp123.MainActivity.onCreate(MainActivity.java:32)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2026)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2087)
at android.app.ActivityThread.access$600(ActivityThread.java:133)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1198)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4793)
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:808)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:575)
at dalvik.system.NativeStart.main(Native Method)
答案 0 :(得分:0)
我认为你包括
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
进入你的清单文件,教程使用eclipse但你使用的是android studio
修复它从你的主要节目中删除uses-sdk