Android Question LoadBitmapResize error

Discussion in 'Android Questions' started by Alberto Michelis, Jun 9, 2019.

  1. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Hi, Ive opend an old project, open the designer, change some images sizes, recompile and gettting the following error

    B4A Version: 8.80
    Parsing code. Error
    Error parsing program.
    Error description: Undeclared variable 'loadbitmapresize' is used before it was assigned any value.
    Error occurred on line: 266 (HttpJob)
    Return LoadBitmapResize(HttpUtils2Service.TempFolder, taskId, Width, Height, KeepAspectRatio)

    I search the project for LoadBitmapResize but nothing, only I use id LoadBitmap, so I think its from the designer but I can find it.

    Thanks for your help
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Check the list of modules, if you see HttpJob and HttpUtils2Service then remove them and add a reference to OkHttpUtils2 library.
     
  3. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    I had HttpJob and OkHttpUtils2 , delete HttpJob but the error persists,
    Please seee images.
    Clicking on the log error does nothing and I dont know which line 266 it refers to.

    q.png l.png
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Make sure to also remove HttpUtils2Service.

    It is possible that one of the old libraries reference an old version of OkHttpUtils2. Create a new project and add all the libraries. Are you able to compile? If not, start removing libraries until you find the problematic one.
     
  5. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    The app compiles ok in b4a 7.01 but not in 8.8
    Looking at the Libraries folder, I have the same OkHttpUtils2.jar and xml in both but 8.80 adds a OkHttpUtils2.b4xlib
    Ive tried to rename it and then b4a sais it does not find it. It happend in 8.8 and NOt in 7.01
    Any idea of why?
    q.png
     
  6. DonManfred

    DonManfred Expert Licensed User

    okhttputils2.b4xlib should be in the internal librar folder. Even the two okhttputils2.xml and okhttputils2.jar.

    Check if you have a second copy in the additional library folder (there should not be any).
     
  7. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Ive Deleted jar and xml, check they are not in the aditional folder
    Compiled and the error persists... q.png
    Do I have to delete the rest of OKhttp* files ?
     
  8. sorex

    sorex Expert Licensed User

    my OkHttp files are from 31/12/2018. Remove those in the additional lib folder as you probably have newer ones in the program folder.

    and refresh the lib list or close and reopen the project
     
  9. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    deleted and same error...
    from where can I download the last okhttputil2 libs? cant find it
     
  10. sorex

    sorex Expert Licensed User

    they should be under "c:\Program Files (x86)\Anywhere Software\Basic4android\Libraries\"
     
  11. sorex

    sorex Expert Licensed User

    this is what I have

    Code:
    OkHttp.jar    52 340    31/12/2018 11:32    -a--
    OkHttp.xml    
    15 326    31/12/2018 11:32    -a--
    okhttp-
    3.5.0.jar    350 361    31/12/2018 11:32    -a--
    OkHttpUtils2.b4xlib    
    3 967    31/12/2018 11:32    -a--
    OkHttpUtils2.jar    
    12 228    31/12/2018 11:32    -a--
    OkHttpUtils2.xml    
    12 079    31/12/2018 11:32    -a--
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    Create a new project and add all the libraries. Are you able to compile? If not, start removing libraries until you find the problematic one.
     
  13. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    May be Im having a worst problem...
    I open b4a and try to compile the project suggested as a test and get the following error:
    q.png
    Ive downloaded java 211 and reinstall it, run the android sdk and install all files suggested and nothing...
     
  14. sorex

    sorex Expert Licensed User

    are you using the new (B4A) method to download the SDK or the old one?
     
  15. Erel

    Erel Administrator Staff Member Licensed User

    They are not related.

    This error means that the internal libraries and B4A versions do not match. Delete B4A and reinstall it in a new empty folder.
     
Loading...
  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