Android Question Compile Error with HTTP

Discussion in 'Android Questions' started by DOM85, Oct 26, 2018.

  1. DOM85

    DOM85 Active Member Licensed User

    When i compile an app using http library, i obtain an error (attached picture).
    However this error appears under this configuration :
    B4A V8.50, WIN 10, Javac 1.8.0_191

    Under an old configuration i have no error and the app work fine :
    B4A V5.20, WIN XP, Javac 1.6.0_20

    I post after many re-installation of Java sdk, with no success.

    I made this next small exemple to better see the problem.
    I you could help me !
    Thank you.

    #Region Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
    #End Region

    #Region Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
    #End Region

    Sub Process_Globals
    Dim hc As HttpClient 'Required to connect to the Internet
    End Sub

    Sub Globals
    End Sub

    Sub Activity_Create(FirstTime As Boolean)
    hc.Initialize("hc") '***** COMPLIE ERROR ON THIS LINE ******
    End Sub

    Sub Activity_Resume
    End Sub

    Sub Activity_Pause (UserClosed As Boolean)
    End Sub

    Attached Files:

  2. DonManfred

    DonManfred Expert Licensed User

    replace http and httputils with okhttp and okhttputils.
  3. DOM85

    DOM85 Active Member Licensed User

    A big Thanks to you ! All is fine now !
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice