NativeScript / NativeScript/android
wrong native method signature called.
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 563
- フォーク
- 144
- 平均マージ
- 10時間 46分
- マージ済み PR(30日)
- 14
説明
I found an issue with runtime which actually calls the wrong method on android.
this the method
https://developer.android.com/reference/android/location/LocationManager#addNmeaListener(android.location.GpsStatus.NmeaListener)
That method changed in 24 and now use that signature https://developer.android.com/reference/android/location/LocationManager#addNmeaListener(android.location.OnNmeaMessageListener)
The issue is that in both cases the parameter is actually a java.lang.Object. And the runtime actually always chooses this one even on pre 24 => crash.
We discovered that issue in my gps plugin here and the actual crash happens here https://github.com/nativescript-community/gps/blob/b3fe1d032cb3e5b6f7b76f1cf62926fdab6d0baa/src/gps.android.ts#L456
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
参照されている gps.android.ts の箇所、特に 83 行目と 456 行目から始め、runtime が LocationManager.addNmeaListener を呼び出す方法を再現します。次に、Android のネイティブなメソッド選択コードを追跡し、pre-24 と 24+ が適切なシグネチャを使用し、クラッシュしないことを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- android, cpp
- 領域
- mobile-dev
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100