美文网首页
解决okio ArrayIndexOutOfBoundsExce

解决okio ArrayIndexOutOfBoundsExce

作者: Xigong | 来源:发表于2018-05-29 22:00 被阅读0次

    崩溃日志:

    
    versionName: 3.8.22
    versionCode: 3822
    手机型号:HUAWEI TIT-AL00,SDK版本:22,系统版本:5.1,
    手机型号BOARD=TIT-AL00
    BOOTLOADER=unknown
    BRAND=HUAWEI
    CPU_ABI=armeabi-v7a
    CPU_ABI2=armeabi
    DEVICE=HWTIT-AL00
    DISPLAY=TIT-AL00C00B158
    FINGERPRINT=HUAWEI/TIT-AL00/HWTIT-AL00:5.1/HUAWEITIT-AL00/C00B158:user/release-keys
    HARDWARE=mt6735
    HOST=ab5b7a1c5e8b
    ID=HUAWEITIT-AL00
    IS_DEBUGGABLE=false
    MANUFACTURER=HUAWEI
    MODEL=HUAWEI TIT-AL00
    PRODUCT=TIT-AL00
    RADIO=unknown
    SERIAL=AVY9KA9632904345
    SUPPORTED_32_BIT_ABIS=[Ljava.lang.String;@3d772e89
    SUPPORTED_64_BIT_ABIS=[Ljava.lang.String;@2e2be8e
    SUPPORTED_ABIS=[Ljava.lang.String;@6e96af
    TAG=Build
    TAGS=release-keys
    TIME=1469439868000
    TYPE=user
    UNKNOWN=unknown
    USER=unknown
    
    java.lang.ArrayIndexOutOfBoundsException: length=24; index=858688864
        at okio.Base64.encode(Unknown Source)
        at okio.Base64.encode(Unknown Source)
        at okio.ByteString.base64(Unknown Source)
        at okhttp3.ws.WebSocketCall.<init>(Unknown Source)
        at okhttp3.ws.WebSocketCall.<init>(Unknown Source)
        at okhttp3.ws.WebSocketCall.create(Unknown Source)
        at io.socket.engineio.client.transports.WebSocket.doOpen(Unknown Source)
        at io.socket.engineio.client.Transport$1.run(Unknown Source)
        at io.socket.thread.EventThread.exec(Unknown Source)
        at io.socket.engineio.client.Transport.open(Unknown Source)
        at io.socket.engineio.client.Socket.probe(Unknown Source)
        at io.socket.engineio.client.Socket.onOpen(Unknown Source)
        at io.socket.engineio.client.Socket.onHandshake(Unknown Source)
        at io.socket.engineio.client.Socket.onPacket(Unknown Source)
        at io.socket.engineio.client.Socket.access$900(Unknown Source)
        at io.socket.engineio.client.Socket$5.call(Unknown Source)
        at io.socket.emitter.Emitter.emit(Unknown Source)
        at io.socket.engineio.client.Transport.onPacket(Unknown Source)
        at io.socket.engineio.client.transports.Polling.access$700(Unknown Source)
        at io.socket.engineio.client.transports.Polling$2.call(Unknown Source)
        at io.socket.engineio.parser.Parser.decodePayload(Unknown Source)
        at io.socket.engineio.client.transports.Polling._onData(Unknown Source)
        at io.socket.engineio.client.transports.Polling.onData(Unknown Source)
        at io.socket.engineio.client.transports.PollingXHR$5$1.run(Unknown Source)
        at io.socket.thread.EventThread$2.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:818)
    
    
    • 机型: 华为畅享5
    • 系统: android 5.1

    搜到的相关问题。

    问题分析

    这是是特定机型的平台问题。

    解决方式

    禁用d8 dex编译器
    在项目的根目录的gradle.properties ,添加 android.enableD8=false

    局限性

    已经向google 提issues https://issuetracker.google.com/issues/80408606

    google已经解决了这个问题

    使用 3.1.3 的android gradle tool

    classpath 'com.android.tools.build:gradle:3.1.3'
    

    请参考
    https://issuetracker.google.com/issues/77996377

    相关文章

      网友评论

          本文标题:解决okio ArrayIndexOutOfBoundsExce

          本文链接:https://www.haomeiwen.com/subject/yjlzjftx.html