Apache HttpClient 4.1 on Android

前端 未结 5 497
余生分开走
余生分开走 2020-12-06 14:32

Has anyone tried to use a newer version of Apache HttpClient on Android? There\'s an annoying bug in the HttpClient used by Android and I was wondering if I would run into p

5条回答
  •  伪装坚强ぢ
    2020-12-06 14:37

    I was running 4.1 just fine until I started using ThreadSafeClientConnManager and Scheme which produced some nasty runtime errors.

    ERROR/dalvikvm(1077): Could not find method org.apache.http.conn.scheme.Scheme., referenced from method com.example.MyActivity.download
    WARN/dalvikvm(1077): VFY: unable to resolve direct method 3290: Lorg/apache/http/conn/scheme/Scheme;. (Ljava/lang/String;ILorg/apache/http/conn/scheme/SchemeSocketFactory;)V
    WARN/dalvikvm(1077): VFY:  rejecting opcode 0x70 at 0x0035
    

    I suspect the older Scheme in Android API is used which has a different constructor.

提交回复
热议问题