実現したいこと
コンパイルエラーを解決したいです。
発生している問題・分からないこと
map[0xC4]!!の所で「Type inference failed. The value of the type parameter K should be mentioned in input types (argument types, receiver type or expected type). Try to specify it explicitly.」とエラーが出ていますので解決したいです。
エラーメッセージ
error
1Type inference failed. The value of the type parameter K should be mentioned in input types (argument types, receiver type or expected type). Try to specify it explicitly.
該当のソースコード
Kotlin
1 var array = arrayOf( 2 0xC4, 3 0xC5, 4 0x1C, 5 0x1D, 6 0x1E, 7 0x1F, 8 0x21, 9 0x22, 10 0x23, 11 0x24 12 ).map { 13 it.toByte() 14 } 15 var map = itemForHash(byteArray, array); 16 17 item.licenceColor = 18 (DataUtil.stringToBytes(preByte) + map[0xC4]!! + DataUtil.stringToBytes(afterByte)).toString( 19 charset("JIS") 20 ) 21
試したこと・調べたこと
- teratailやGoogle等で検索した
- ソースコードを自分なりに変更した
- 知人に聞いた
- その他
上記の詳細・結果
map.get(0xC4)!!としてみましたが解決しませんでした。
補足
Android11

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。