为什么我的申请强行关闭?

时间:2015-02-10 21:44:16

标签: android api location forceclose

我第一次尝试使用google maps api,但是每当我启动它时,我的应用程序都会崩溃。我将它部署到我的Android设备而不是任何模拟器。这是我使用的教程,我的代码基本相同: - Tutorials point google maps tutorial

抱歉,我不能更具体,因为我不知道出了什么问题。这是我从logcat复制的日志文件。

02-11 02:55:44.351: D/ActivityThread(1779): handleBindApplication:com.google.android.gms.wearable
02-11 02:55:44.351: D/ActivityThread(1779): setTargetHeapUtilization:0.75
02-11 02:55:44.351: D/ActivityThread(1779): setTargetHeapMinFree:2097152
02-11 02:55:44.531: I/MultiDex(1779): VM with version 1.6.0 does not have multidex support
02-11 02:55:44.531: I/MultiDex(1779): install
02-11 02:55:44.531: I/MultiDex(1779): MultiDexExtractor.load(/data/app/com.google.android.gms-1.apk, false)
02-11 02:55:44.551: I/MultiDex(1779): loading existing secondary dex files
02-11 02:55:44.561: I/MultiDex(1779): load found 2 secondary dex files
02-11 02:55:44.571: I/MultiDex(1779): install done
02-11 02:55:44.591: I/ProviderInstaller(1779): Insert disabled by gate 'gms:security:enable_conscrypt_in_gms_application'
02-11 02:55:44.611: D/LocationInitializer(1093): Restart initialization of location
02-11 02:55:44.631: I/dalvikvm(1779): Could not find method android.os.UserManager.getUserProfiles, referenced from method com.google.android.gms.wearable.service.y.a
02-11 02:55:44.631: W/dalvikvm(1779): VFY: unable to resolve virtual method 1110: Landroid/os/UserManager;.getUserProfiles ()Ljava/util/List;
02-11 02:55:44.631: D/dalvikvm(1779): VFY: replacing opcode 0x6e at 0x0035
02-11 02:56:48.241: D/ActivityThread(2361): handleBindApplication:com.google.android.gms
02-11 02:56:48.241: D/ActivityThread(2361): setTargetHeapUtilization:0.75
02-11 02:56:48.241: D/ActivityThread(2361): setTargetHeapMinFree:2097152
02-11 02:56:48.301: I/MultiDex(2361): VM with version 1.6.0 does not have multidex support
02-11 02:56:48.301: I/MultiDex(2361): install
02-11 02:56:48.301: I/MultiDex(2361): MultiDexExtractor.load(/data/app/com.google.android.gms-1.apk, false)
02-11 02:56:48.311: I/MultiDex(2361): loading existing secondary dex files
02-11 02:56:48.311: I/MultiDex(2361): load found 2 secondary dex files
02-11 02:56:48.321: I/MultiDex(2361): install done
02-11 02:56:48.591: I/ProviderInstaller(2361): Insert disabled by gate 'gms:security:enable_conscrypt_in_gms_application'
02-11 02:56:48.711: D/LocationInitializer(2361): Restart initialization of location
02-11 02:58:46.871: D/ActivityThread(2762): handleBindApplication:com.google.android.gms.wearable
02-11 02:58:46.881: D/ActivityThread(2762): setTargetHeapUtilization:0.75
02-11 02:58:46.881: D/ActivityThread(2762): setTargetHeapMinFree:2097152
02-11 02:58:46.911: I/MultiDex(2762): VM with version 1.6.0 does not have multidex support
02-11 02:58:46.911: I/MultiDex(2762): install
02-11 02:58:46.911: I/MultiDex(2762): MultiDexExtractor.load(/data/app/com.google.android.gms-1.apk, false)
02-11 02:58:46.921: I/MultiDex(2762): loading existing secondary dex files
02-11 02:58:46.921: I/MultiDex(2762): load found 2 secondary dex files
02-11 02:58:46.921: I/MultiDex(2762): install done
02-11 02:58:46.931: I/ProviderInstaller(2762): Insert disabled by gate 'gms:security:enable_conscrypt_in_gms_application'
02-11 02:58:46.961: D/LocationInitializer(2361): Restart initialization of location
02-11 02:58:46.971: I/dalvikvm(2762): Could not find method android.os.UserManager.getUserProfiles, referenced from method com.google.android.gms.wearable.service.y.a
02-11 02:58:46.971: W/dalvikvm(2762): VFY: unable to resolve virtual method 1110: Landroid/os/UserManager;.getUserProfiles ()Ljava/util/List;
02-11 02:58:46.971: D/dalvikvm(2762): VFY: replacing opcode 0x6e at 0x0035
02-11 02:58:48.791: W/ActivityThread(2361): ClassLoader.loadClass: The class loader returned by Thread.getContextClassLoader() may fail for processes that host multiple applications. You should explicitly specify a context class loader. For example: Thread.setContextClassLoader(getClass().getClassLoader());
02-11 02:58:50.701: W/GAV4(2361): Thread[Thread-2248,5,main]: Exception sending hit: HttpHostConnectException
02-11 02:58:50.701: W/GAV4(2361): Thread[Thread-2248,5,main]: Connection to https://ssl.google-analytics.com refused
02-11 02:58:50.711: W/GAV4(2361): Thread[Thread-2248,5,main]: Empty hitIds passed to deleteHits.
02-11 03:00:50.641: W/GAV4(2361): Thread[Thread-2248,5,main]: Exception sending hit: HttpHostConnectException
02-11 03:00:50.641: W/GAV4(2361): Thread[Thread-2248,5,main]: Connection to https://ssl.google-analytics.com refused
02-11 03:00:50.641: W/GAV4(2361): Thread[Thread-2248,5,main]: Empty hitIds passed to deleteHits.
02-11 03:02:15.251: I/CastSocket(2361): 19 >= 18. Adding new CastClientAuthKeyManager.
02-11 03:02:50.681: W/GAV4(2361): Thread[Thread-2248,5,main]: Exception sending hit: HttpHostConnectException
02-11 03:02:50.681: W/GAV4(2361): Thread[Thread-2248,5,main]: Connection to https://ssl.google-analytics.com refused
02-11 03:02:50.681: W/GAV4(2361): Thread[Thread-2248,5,main]: Empty hitIds passed to deleteHits.
02-11 03:04:00.431: I/EventLogService(2361): Aggregate from 1423602234108 (log), 1423602234108 (data)
02-11 03:04:00.601: W/EventLogAggregator(2361): Unknown tag: faceunlock
02-11 03:04:00.601: W/EventLogAggregator(2361): Unknown tag: snet
02-11 03:04:00.601: W/EventLogAggregator(2361): Unknown tag: snet_gcore
02-11 03:04:00.601: W/EventLogAggregator(2361): Unknown tag: snet_launch_service
02-11 03:04:50.751: W/GAV4(2361): Thread[Thread-2248,5,main]: Exception sending hit: HttpHostConnectException
02-11 03:04:50.751: W/GAV4(2361): Thread[Thread-2248,5,main]: Connection to https://ssl.google-analytics.com refused
02-11 03:04:50.751: W/GAV4(2361): Thread[Thread-2248,5,main]: Empty hitIds passed to deleteHits.
02-11 03:05:44.741: D/ActivityThread(4287): handleBindApplication:com.google.android.gms
02-11 03:05:44.741: D/ActivityThread(4287): setTargetHeapUtilization:0.75
02-11 03:05:44.751: D/ActivityThread(4287): setTargetHeapMinFree:2097152
02-11 03:05:44.921: I/MultiDex(4287): VM with version 1.6.0 does not have multidex support
02-11 03:05:44.931: I/MultiDex(4287): install
02-11 03:05:44.931: I/MultiDex(4287): MultiDexExtractor.load(/data/app/com.google.android.gms-1.apk, false)
02-11 03:05:44.951: I/MultiDex(4287): loading existing secondary dex files
02-11 03:05:44.951: I/MultiDex(4287): load found 2 secondary dex files
02-11 03:05:44.961: I/MultiDex(4287): install done
02-11 03:05:45.291: I/ProviderInstaller(4287): Insert disabled by gate 'gms:security:enable_conscrypt_in_gms_application'
02-11 03:05:45.441: D/LocationInitializer(4287): Restart initialization of location
02-11 03:06:23.581: D/LocationInitializer(4287): Restart initialization of location
02-11 03:07:45.621: W/ActivityThread(4287): ClassLoader.loadClass: The class loader returned by Thread.getContextClassLoader() may fail for processes that host multiple applications. You should explicitly specify a context class loader. For example: Thread.setContextClassLoader(getClass().getClassLoader());
02-11 03:07:47.521: W/GAV4(4287): Thread[Thread-2299,5,main]: Exception sending hit: HttpHostConnectException
02-11 03:07:47.521: W/GAV4(4287): Thread[Thread-2299,5,main]: Connection to https://ssl.google-analytics.com refused
02-11 03:07:47.521: W/GAV4(4287): Thread[Thread-2299,5,main]: Empty hitIds passed to deleteHits.

1 个答案:

答案 0 :(得分:1)

看起来它实际上是与谷歌分析的连接被拒绝。

这是一个常见的原因,如果您有修改后的主机文件来阻止手机/设备上的广告 - 这也可能阻止了对Google Analytics的调用。