2017-04-21 144 views
0

儘管運行在我respberry PI演示(https://github.com/androidthings/doorbell),我遇到錯誤,如下列:無法獲取廣告ID

01-01 00:11:00.830 5672-5672/com.company.androidthings.doorbell I/CameraManagerGlobal: Connecting to camera service 
01-01 00:11:00.835 5672-5672/com.company.androidthings.doorbell D/DoorbellCamera: Using camera id 0 
01-01 00:11:00.853 5672-5723/com.company.androidthings.doorbell D/DoorbellCamera: Opened camera. 
01-01 00:11:00.995 5672-5715/com.company.androidthings.doorbell I/FA: This instance being marked as an uploader 
01-01 00:11:01.122 5672-5715/com.company.androidthings.doorbell D/FA: Unable to get advertising id: com.google.android.gms.common.GooglePlayServicesNotAvailableException: com.google.android.gms.measurement.internal.zzt.zzlx(Unknown Source) 
01-01 00:11:01.253 5672-5732/com.company.androidthings.doorbell D/FirebaseInstanceId: background sync failed: SERVICE_NOT_AVAILABLE, retry in 10s 

以下是我試過的方法:

  1. 我做了一些調查,並找到以下相關的帖子: adjust/unity_sdk#88

按照指令安裝播放服務android SDK管理工具(使用android studio)。清理項目。重建。將新的apk安裝到respberry PI中,但仍然有相同的錯誤日誌。

我也檢查了Firebase控制檯,沒有圖片被更新。即使從android顯示器,確認按鈕被推動相機按預期工作。

  1. 關於互聯網連接,我在樹莓派上安裝了另一個應用程序。它成功地將信息發送到服務器。它確認連通性按預期工作。

有什麼建議嗎?

+0

Internet已連接。樹莓派配置爲連接無線路由器 – Hong

回答

1

您看到的日誌消息來自FirebaseAnalytics(日誌標記中的「FA」),因爲此示例中未啓用分析(除非您添加了代碼以啓用它),所以它很有意義。注意這也是一個調試消息(日誌標記中的「D」),而不是錯誤/警告。

這應該不會影響門鈴示例,所以如果您無法將圖片正確上傳到Firebase,那麼項目配置可能有其他錯誤,並且日誌中可能還有其他線索更深。

+0

謝謝!您的評論可幫助我瞭解「無法獲取廣告ID:」的分心。事實證明,配置不合適。它使用不安裝谷歌播放服務的新SDK路徑。一旦我切換到安裝谷歌播放服務的系統的默認SDK路徑。雖然該消息「無法獲取廣告ID:」仍然存在,但日誌看起來不同。看起來(從FA日誌)應用程序可以與服務器通話。我仍在處理其他問題。 – Hong

0

事實證明,配置不合適。它使用不安裝谷歌播放服務的新SDK路徑。一旦我切換到安裝谷歌播放服務的系統的默認SDK路徑。雖然該消息「無法獲取廣告ID:」仍然存在,但日誌看起來不同。看起來(從FA日誌)應用程序可以與服務器通話。

04-24 15:22:53.659 16642-16642/? I/art: Late-enabling -Xcheck:jni 
04-24 15:22:53.661 16642-16642/? W/art: Unknown instruction set features for ARM CPU variant (generic) using conservative defaults 
04-24 15:22:53.709 16642-16649/? I/art: Debugger is no longer active 
04-24 15:22:53.709 16642-16649/? I/art: Starting a blocking GC Instrumentation 
04-24 15:22:54.610 16642-16642/? W/System: ClassLoader referenced unknown path: /data/app/com.company.androidthings.doorbell-1/lib/arm 
04-24 15:22:54.678 16642-16642/com.company.androidthings.doorbell D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization. 
04-24 15:22:54.712 16642-16642/com.company.androidthings.doorbell W/InstanceID/Rpc: Found 10007 
04-24 15:22:54.723 16642-16642/com.company.androidthings.doorbell D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization. 
04-24 15:22:54.812 16642-16642/com.company.androidthings.doorbell I/FA: App measurement is starting up, version: 9452 
04-24 15:22:54.812 16642-16642/com.company.androidthings.doorbell I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE 
04-24 15:22:54.812 16642-16642/com.company.androidthings.doorbell D/FA: Debug logging enabled 
04-24 15:22:54.812 16642-16642/com.company.androidthings.doorbell D/FA: AppMeasurement singleton hash: 202124672 
04-24 15:22:54.906 16642-16642/com.company.androidthings.doorbell V/FA: Collection enabled 
04-24 15:22:54.907 16642-16642/com.company.androidthings.doorbell V/FA: App package, google app id: com.company.androidthings.doorbell, 1:821276198771:android:044f9c86291658f3 
04-24 15:22:54.980 16642-16642/com.company.androidthings.doorbell V/FA: Registered activity lifecycle callback 
04-24 15:22:54.986 16642-16642/com.company.androidthings.doorbell I/FirebaseInitProvider: FirebaseApp initialization successful 
04-24 15:22:54.989 16642-16642/com.company.androidthings.doorbell I/InstantRun: starting instant run server: is main process 
04-24 15:22:55.000 16642-16666/com.company.androidthings.doorbell V/FA: State of service unknown 
04-24 15:22:55.000 16642-16666/com.company.androidthings.doorbell V/FA: Checking service availability 
04-24 15:22:55.015 16642-16666/com.company.androidthings.doorbell W/GooglePlayServicesUtil: Google Play Store is missing. 
04-24 15:22:55.015 16642-16666/com.company.androidthings.doorbell W/FA: Service invalid 
04-24 15:22:55.016 16642-16666/com.company.androidthings.doorbell V/FA: Setting useService: false 
04-24 15:22:55.019 16642-16666/com.company.androidthings.doorbell V/FA: Using local app measurement service 
04-24 15:22:55.449 16642-16642/com.company.androidthings.doorbell V/FA: onActivityCreated 
04-24 15:22:55.449 16642-16642/com.company.androidthings.doorbell D/DoorbellActivity: Doorbell Activity created. 
04-24 15:22:55.450 16642-16642/com.company.androidthings.doorbell D/DoorbellActivity: No permission 
04-24 15:22:55.502 16642-16666/com.company.androidthings.doorbell V/FA: Activity resumed, time: 331914987 
04-24 15:22:55.530 16642-16642/com.company.androidthings.doorbell V/FA: Local AppMeasurementService is starting up 
04-24 15:22:55.563 16642-16642/com.company.androidthings.doorbell V/FA: Bound to IMeasurementService interface 
04-24 15:22:55.565 16642-16666/com.company.androidthings.doorbell V/FA: Connected to service 
04-24 15:22:55.566 16642-16666/com.company.androidthings.doorbell V/FA: Processing queued up service tasks: 1 
04-24 15:22:59.196 16642-16666/com.company.androidthings.doorbell W/art: Long monitor contention with owner pool-2-thread-1 (16678) at long com.android.org.conscrypt.NativeCrypto.RSA_generate_key_ex(int, byte[])(NativeCrypto.java:-2) waiters=0 in java.lang.String com.google.firebase.iid.zzg.get(java.lang.String, java.lang.String) for 3.621s 
04-24 15:22:59.236 16642-16666/com.company.androidthings.doorbell I/FA: This instance being marked as an uploader 
04-24 15:22:59.696 16642-16666/com.company.androidthings.doorbell D/FA: Unable to get advertising id: com.google.android.gms.common.GooglePlayServicesNotAvailableException: com.google.android.gms.measurement.internal.zzt.zzlx(Unknown Source) 
04-24 15:22:59.711 16642-16666/com.company.androidthings.doorbell D/FA: Setting user property: _fot, 1493049600000 
04-24 15:22:59.719 16642-16666/com.company.androidthings.doorbell D/FA: User property set: _fot, 1493049600000 
04-24 15:22:59.723 16642-16666/com.company.androidthings.doorbell V/FA: Logging event: origin=auto,name=_f,params=Bundle[{_c=1}] 
04-24 15:22:59.790 16642-16666/com.company.androidthings.doorbell V/FA: Saving event, name, data size: _f, 22 
04-24 15:22:59.792 16642-16666/com.company.androidthings.doorbell V/FA: Event recorded: Event{appId='com.company.androidthings.doorbell', name='_f', params=Bundle[{_c=1, _o=auto}]} 
04-24 15:22:59.802 16642-16666/com.company.androidthings.doorbell V/FA: Upload scheduled in approximately ms: 14436 
04-24 15:22:59.807 16642-16666/com.company.androidthings.doorbell V/FA: Background event processing time, ms: 84 
04-24 15:22:59.808 16642-16666/com.company.androidthings.doorbell V/FA: Logging event: origin=auto,name=_e,params=Bundle[{_et=1}] 
04-24 15:22:59.840 16642-16666/com.company.androidthings.doorbell V/FA: Saving event, name, data size: _e, 23 
04-24 15:22:59.841 16642-16666/com.company.androidthings.doorbell V/FA: Event recorded: Event{appId='com.company.androidthings.doorbell', name='_e', params=Bundle[{_o=auto, _et=1}]} 
04-24 15:22:59.847 16642-16666/com.company.androidthings.doorbell V/FA: Upload scheduled in approximately ms: 14390 
04-24 15:22:59.853 16642-16666/com.company.androidthings.doorbell V/FA: Background event processing time, ms: 45 
04-24 15:23:04.241 16642-16666/com.company.androidthings.doorbell V/FA: Inactivity, disconnecting from AppMeasurementService 
04-24 15:23:04.276 16642-16642/com.company.androidthings.doorbell V/FA: onUnbind called for intent. action: com.google.android.gms.measurement.START 
04-24 15:23:04.277 16642-16642/com.company.androidthings.doorbell V/FA: Local AppMeasurementService is shutting down 
04-24 15:23:05.504 16642-16666/com.company.androidthings.doorbell V/FA: Session started, time: 331924989 
04-24 15:23:05.550 16642-16666/com.company.androidthings.doorbell I/FA: Tag Manager is not found and thus will not be used 
04-24 15:23:05.552 16642-16666/com.company.androidthings.doorbell D/FA: Logging event (FE): _s, Bundle[{_o=auto}] 
04-24 15:23:05.555 16642-16666/com.company.androidthings.doorbell V/FA: Using local app measurement service 
04-24 15:23:05.562 16642-16642/com.company.androidthings.doorbell V/FA: Local AppMeasurementService is starting up 
04-24 15:23:05.564 16642-16642/com.company.androidthings.doorbell V/FA: Bound to IMeasurementService interface 
04-24 15:23:05.564 16642-16666/com.company.androidthings.doorbell V/FA: Connected to service 
04-24 15:23:05.565 16642-16666/com.company.androidthings.doorbell V/FA: Processing queued up service tasks: 1 
04-24 15:23:05.572 16642-16666/com.company.androidthings.doorbell V/FA: Logging event: origin=auto,name=_s,params=Bundle[{_o=auto}] 
04-24 15:23:05.594 16642-16666/com.company.androidthings.doorbell V/FA: Saving event, name, data size: _s, 14 
04-24 15:23:05.596 16642-16666/com.company.androidthings.doorbell V/FA: Event recorded: Event{appId='com.company.androidthings.doorbell', name='_s', params=Bundle[{_o=auto}]} 
04-24 15:23:05.655 16642-16666/com.company.androidthings.doorbell V/FA: Upload scheduled in approximately ms: 14850 
04-24 15:23:05.660 16642-16666/com.company.androidthings.doorbell V/FA: Background event processing time, ms: 89 
04-24 15:23:10.577 16642-16666/com.company.androidthings.doorbell V/FA: Inactivity, disconnecting from AppMeasurementService 
04-24 15:23:10.616 16642-16642/com.company.androidthings.doorbell V/FA: onUnbind called for intent. action: com.google.android.gms.measurement.START 
04-24 15:23:10.618 16642-16642/com.company.androidthings.doorbell V/FA: Local AppMeasurementService is shutting down 
04-24 15:23:20.547 16642-16642/com.company.androidthings.doorbell V/FA: Local AppMeasurementReceiver got: com.google.android.gms.measurement.UPLOAD 
04-24 15:23:20.562 16642-16642/com.company.androidthings.doorbell V/FA: Local AppMeasurementService is starting up 
04-24 15:23:20.564 16642-16642/com.company.androidthings.doorbell V/FA: Local AppMeasurementService called. startId, action: 1, com.google.android.gms.measurement.UPLOAD 
04-24 15:23:20.588 16642-16666/com.company.androidthings.doorbell V/FA: Fetching remote configuration: com.company.androidthings.doorbell 
04-24 15:23:20.598 16642-16642/com.company.androidthings.doorbell V/FA: Local AppMeasurementService processed last upload request 
04-24 15:23:20.598 16642-16642/com.company.androidthings.doorbell V/FA: Local AppMeasurementService is shutting down 
04-24 15:23:20.601 16642-17004/com.company.androidthings.doorbell D/NetworkSecurityConfig: No Network Security Config specified, using platform default 
04-24 15:23:21.835 16642-16666/com.company.androidthings.doorbell V/FA: Parsed config. version, gmp_app_id: 1492543680583000, 1:821276198771:android:044f9c86291658f3 
04-24 15:23:21.841 16642-16666/com.company.androidthings.doorbell V/FA: Successfully fetched config. Got network response. code, size: 200, 52 
04-24 15:23:21.892 16642-16666/com.company.androidthings.doorbell V/FA: event, affected audience count: _f, 0 
04-24 15:23:21.896 16642-16666/com.company.androidthings.doorbell V/FA: event, affected audience count: _e, 0 
04-24 15:23:21.899 16642-16666/com.company.androidthings.doorbell V/FA: event, affected audience count: _s, 0 
04-24 15:23:21.901 16642-16666/com.company.androidthings.doorbell V/FA: property, affected audience count: _fot, 0 
04-24 15:23:21.924 16642-16666/com.company.androidthings.doorbell V/FA: Saving bundle, size: 301 
04-24 15:23:21.947 16642-16666/com.company.androidthings.doorbell V/FA: Uploading data. app, uncompressed size, data: com.company.androidthings.doorbell, 356, 
                     batch { 
                     bundle { 
                      protocol_version: 1 
                      platform: android 
                      gmp_version: 9452 
                      uploading_gmp_version: 9452 
                      gmp_app_id: 1:821276198771:android:044f9c86291658f3 
                      app_id: com.company.androidthings.doorbell 
                      app_version: 1.0 
                      app_version_major: 1 
                      firebase_instance_id: eNnLI0cB484 
                      dev_cert_hash: -8029454304837808102 
                      app_store: manual_install 
                      upload_timestamp_millis: 1493047401878 
                      start_timestamp_millis: 1493047379237 
                      end_timestamp_millis: 1493047385505 
                      app_instance_id: 570e158a1616db1ea428bad0ac67c079 
                      os_version: 7.0 
                      device_model: iot_rpi3 
                      user_default_language: en-us 
                      time_zone_offset_minutes: 0 
                      bundle_sequential_index: 1 
                      service_upload: false 
                      user_property { 
                      set_timestamp_millis: 1493047379237 
                      name: _fot 
                      int_value: 1493049600000 
                      } 
                      event { 
                      name: _f 
                      timestamp_millis: 1493047379237 
                      previous_timestamp_millis: 0 
                      param { 
                       name: _c 
                       int_value: 1 
                      } 
                      param { 
                       name: _o 
                       string_value: auto 
                      } 
                      } 
                      event { 
                      name: _e 
                      timestamp_millis: 1493047379237 
                      previous_timestamp_millis: 0 
                      param { 
                       name: _o 
                       string_value: auto 
                      } 
                      param { 
                       name: _et 
                       int_value: 1 
                      } 
                      } 
                      event { 
                      name: _s 
                      timestamp_millis: 1493047385505 
                      previous_timestamp_millis: 0 
                      param { 
                       name: _o 
                       string_value: auto 
                      } 
                      } 
                     } 
                     } 
04-24 15:23:21.950 16642-17004/com.company.androidthings.doorbell V/FA: Uploading data. size: 315 
04-24 15:23:22.025 16642-16666/com.company.androidthings.doorbell V/FA: Upload scheduled in approximately ms: 3599959 
04-24 15:23:22.030 16642-16666/com.company.androidthings.doorbell V/FA: Successful upload. Got network response. code, size: 204, 0