Ошибка с библиотеками Google play-services-location и play-services-analytics - PullRequest
0 голосов
/ 30 апреля 2020

У меня есть следующие сервисы:

implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.libraries.places:places:1.1.0'
implementation 'com.google.android.gms:play-services-analytics:11.0.2'

Мое приложение подключается к браслету устройства через Bluetooth. Когда соединение завершено, у меня появляется следующая ошибка:

2020-04-30 19:36:21.562 3113-3283/com.example.healthcarehighbloodpressure D/BluetoothGatt: close()
2020-04-30 19:36:21.563 3113-3283/com.example.healthcarehighbloodpressure D/BluetoothGatt: unregisterApp() - mClientIf=10
2020-04-30 19:36:21.566 3113-3283/com.example.healthcarehighbloodpressure I/[BLE] [BLE:D4:01:07:A4:44:00(3)] BLEGattClient(D4:01:07:A4:44:00)#close: android.bluetooth.BluetoothGatt@ee1d2e5
2020-04-30 19:36:21.581 3113-3283/com.example.healthcarehighbloodpressure I/[BLE] [BLE:D4:01:07:A4:44:00(3)] BLEDevice(D4:01:07:A4:44:00)#notifyState: 16 <- 64
2020-04-30 19:36:21.583 3113-3248/com.example.healthcarehighbloodpressure D/BluetoothAdapter: isLeEnabled(): ON
2020-04-30 19:36:21.591 3113-3248/com.example.healthcarehighbloodpressure I/[BLE] [BLEManager(1)] BLEScanObject#outputScanReport: D4:01:07:A4:44:00/38, <<Adv:38/Device:1>>
2020-04-30 19:36:21.593 3113-3248/com.example.healthcarehighbloodpressure I/[BLE] [BLEManager(1)] BLEManager#eventCallback: change : state=[BLUETOOTH_ON[WAIT_SCAN][SERVER_RUNNING]] / CMD_STOP_SCAN
2020-04-30 19:36:21.599 3113-3248/com.example.healthcarehighbloodpressure D/BluetoothGattServer: clearServices()
2020-04-30 19:36:21.600 3113-3283/com.example.healthcarehighbloodpressure I/[BLE] [BLE:D4:01:07:A4:44:00(3)] BLEDevice#issueEventSyncWithLog: change : state=[DISCONNECTED] / TIMEOUT_DELAY_CLOSE_GATT2
2020-04-30 19:36:21.600 3113-3248/com.example.healthcarehighbloodpressure D/BluetoothGattServer: close()
2020-04-30 19:36:21.600 3113-3248/com.example.healthcarehighbloodpressure D/BluetoothGattServer: unregisterCallback() - mServerIf=9
2020-04-30 19:36:21.601 3113-3248/com.example.healthcarehighbloodpressure I/[BLE] [BLEManager(1)] BLEManager#eventCallback: change : state=[BLUETOOTH_ON[WAIT_SCAN][SERVER_BREAKING]] / EVT_DEVICE_DISCONNECTED
2020-04-30 19:36:21.604 3113-3278/com.example.healthcarehighbloodpressure I/[OHQ] [OHQBLE:D4:01:07:A4:44:00(2)] OHQBleDevice(D4:01:07:A4:44:00)#finalize: broadcast detected : (actionUuid:0, aclConnected:0
2020-04-30 19:36:21.607 3113-3278/com.example.healthcarehighbloodpressure I/[OHQ] [OHQBLE:D4:01:07:A4:44:00(2)] OHQBleDevice(D4:01:07:A4:44:00)#notifyState: 1 <- 4
2020-04-30 19:36:21.608 3113-3278/com.example.healthcarehighbloodpressure I/[OHQ] [OHQBLE:D4:01:07:A4:44:00(2)] OHQBleDevice#eventCallback: change : state=[DISCONNECTED] / EVT_BLE_DISCONNECTED
2020-04-30 19:36:21.609 3113-3277/com.example.healthcarehighbloodpressure I/[OGSC] [OHQ_DEVICE_CALLBACK] OGSCWlpDevice#onDeviceStateChange: (4, 1, 1, 0x0)
2020-04-30 19:36:21.610 3113-3277/com.example.healthcarehighbloodpressure I/[OGSC] [OHQ_DEVICE_CALLBACK] OGSCWlpDevice#onDeviceStateChange: accessEnd completed. change errorCode to BLELIB_ERROR_SUCCESS
2020-04-30 19:36:21.632 3113-3277/com.example.healthcarehighbloodpressure E/AndroidRuntime: FATAL EXCEPTION: OHQ_DEVICE_CALLBACK
    Process: com.example.healthcarehighbloodpressure, PID: 3113
    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbo;
        at com.google.android.gms.internal.zzamj.zzaf(Unknown Source:0)
        at com.google.android.gms.analytics.GoogleAnalytics.getInstance(Unknown Source:0)
        at jp.co.omron.healthcare.communicationlibrary.utility.ErrorInfo.getTracker(Unknown Source:6)
        at jp.co.omron.healthcare.communicationlibrary.ble.BLEErrorInfo.sendGoogleAnalytics(Unknown Source:80)
        at jp.co.omron.healthcare.communicationlibrary.ogsc.b.a(Unknown Source:121)
        at jp.co.omron.healthcare.communicationlibrary.ogsc.j.onDeviceStateChange(Unknown Source:275)
        at jp.co.omron.healthcare.communicationlibrary.ohq.OHQBleDevice$23$1.run(Unknown Source:31)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:224)
        at android.os.HandlerThread.run(HandlerThread.java:67)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbo" on path: DexPathList[[zip file "/data/app/com.example.healthcarehighbloodpressure-5seYA8AMyM_dgXjk44W48g==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.healthcarehighbloodpressure-5seYA8AMyM_dgXjk44W48g==/lib/arm64, /system/lib64, /system/product/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:230)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.google.android.gms.internal.zzamj.zzaf(Unknown Source:0) 
        at com.google.android.gms.analytics.GoogleAnalytics.getInstance(Unknown Source:0) 
        at jp.co.omron.healthcare.communicationlibrary.utility.ErrorInfo.getTracker(Unknown Source:6) 
        at jp.co.omron.healthcare.communicationlibrary.ble.BLEErrorInfo.sendGoogleAnalytics(Unknown Source:80) 
        at jp.co.omron.healthcare.communicationlibrary.ogsc.b.a(Unknown Source:121) 
        at jp.co.omron.healthcare.communicationlibrary.ogsc.j.onDeviceStateChange(Unknown Source:275) 
        at jp.co.omron.healthcare.communicationlibrary.ohq.OHQBleDevice$23$1.run(Unknown Source:31) 
        at android.os.Handler.handleCallback(Handler.java:883) 
        at android.os.Handler.dispatchMessage(Handler.java:100) 
        at android.os.Looper.loop(Looper.java:224) 
        at android.os.HandlerThread.run(HandlerThread.java:67) 
2020-04-30 19:36:21.638 3113-3277/com.example.healthcarehighbloodpressure E/MQSEventManagerDelegate: failed to get MQSService.
2020-04-30 19:36:21.655 3113-3277/com.example.healthcarehighbloodpressure I/Process: Sending signal. PID: 3113 SIG: 9

Если я удаляю библиотеки мест и локаций, все работает нормально. Аналитика является обязательной библиотекой для SDK браслета. В случае с местами мне не нужно, я думал удалить его. Проблема в расположении, моему приложению необходимо определить местоположение пользователя.

У вас есть способ решить это? Заранее спасибо.

...