Android Question HttpUtils2Service is declared twice

Discussion in 'Android Questions' started by rafaelmotaquintana, Apr 11, 2019.

  1. rafaelmotaquintana

    rafaelmotaquintana Active Member Licensed User

    Hello.
    I have seen this messages before in the forum, after upgrade to version 9, the project display this error

    HttpUtils2Service is declared twice. You should either remove the library reference or the code module

    But I dont have Httputils or something similar in modules, and Library reference only OkHttpUtils2.
    I hace performed a full search of Httputils and nothing.
    Project is too big to be uploaded. Please help.
     
  2. DonManfred

    DonManfred Expert Licensed User

    i don´t believe that

    Press CTRL-E and post a screenshot from all modules in your project.

    [​IMG]
     
  3. rafaelmotaquintana

    rafaelmotaquintana Active Member Licensed User

    Attached
     

    Attached Files:

  4. DonManfred

    DonManfred Expert Licensed User

    okhttputils is part of b4a internal libraries.
    Check if you have an additional lib in the additional libs folder. i mean okhttputils2 or okhttp
     
  5. DonManfred

    DonManfred Expert Licensed User

    Try to reproduce it in a small project.
     
  6. rafaelmotaquintana

    rafaelmotaquintana Active Member Licensed User

    Where is the additional lib folder? I found this, b4xlibs, and is empty under Files

    The project uses okhttputils2 and okhttp

    I inserted those 2 libraries in another project and everything is fine.
    I dont know even where to begin the search in the big project
     
  7. DonManfred

    DonManfred Expert Licensed User

    check, if you have a file HttpUtils2Service.bas in your projectfolder.
    It is the path you defined in the IDE under Tools-configure paths.
     
  8. DonManfred

    DonManfred Expert Licensed User

    maybe the ide does not show all modules in a project. Your screen has 25 modules. Maybe this is the limit?

    Try again.

    Press CTRL-E, type http into the searchfield. do you get the module listed now?
     
  9. rafaelmotaquintana

    rafaelmotaquintana Active Member Licensed User

    Yes, is it HttpUtils2Service.bas in the project folder. I removed it.
    And yes, There are and adittional lib folder, and from that folder I removed okhttputils2 and okhttp
    Reload B4A and project, still same message
     
  10. DonManfred

    DonManfred Expert Licensed User

    check post #8
     
  11. DonManfred

    DonManfred Expert Licensed User

    put it back.
    CTRL-E to show the modullist, enter http. If the ide now lists a httpservice module, open it nd remove it from your project using the menuentry.
     
  12. rafaelmotaquintana

    rafaelmotaquintana Active Member Licensed User

    Done, No Http entries in module list.
    Tried using Search, put Http and nothing was displayed.
     
  13. rafaelmotaquintana

    rafaelmotaquintana Active Member Licensed User

    It was working fine in version 8
     
  14. DonManfred

    DonManfred Expert Licensed User

    it is working for me with 9.0 though i only use the official libraries, not the modules.

    Last check: Close the ide. Open the projectfile with a texteditor like notepad++
    You´ll see a list of libaries used in this project

    Is the problematic module listed here?
     
  15. rafaelmotaquintana

    rafaelmotaquintana Active Member Licensed User

    I have this
    Code:
    ManifestCode='This code will be applied to the manifest file during compilation.~\n~'You do not need to modify it in most cases.~\n~'See this link for for more information: http://www.basic4ppc.com/forum/showthread.php?p=78136~\n~AddManifestText(~\n~<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="26"/>~\n~<uses-permission android:name="android.permission.GET_ACCOUNTS" />~\n~<supports-screens android:largeScreens="true" ~\n~    android:normalScreens="true" ~\n~    android:smallScreens="true" ~\n~    android:anyDensity="true"/>)~\n~SetApplicationAttribute(android:icon, "@drawable/icon")~\n~SetApplicationAttribute(android:label, "$LABEL$")~\n~'End of default text.~\n~SetActivityAttribute(Main,  android:windowSoftInputMode, "stateHidden|adjustPan")~\n~SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")~\n~SetApplicationAttribute(android:largeHeap,"true")~\n~AddApplicationText(<activity ~\n~ android:name="com.dropbox.core.android.AuthActivity"~\n~ android:configChanges="orientation|keyboard"~\n~ android:launchMode="singleTask" >~\n~<intent-filter>~\n~  <data android:scheme="db-mifkq3tp0ieeubm" />~\n~  <action android:name="android.intent.action.VIEW" />~\n~  <category android:name="android.intent.category.BROWSABLE" />~\n~  <category android:name="android.intent.category.DEFAULT" />~\n~</intent-filter>~\n~</activity>~\n~<uses-permission~\n~  android:name="android.permission.WRITE_EXTERNAL_STORAGE"~\n~  android:maxSdkVersion="18" />~\n~~\n~)~\n~AddApplicationText(~\n~  <provider~\n~  android:name="android.support.v4.content.FileProvider"~\n~  android:authorities="$PACKAGE$.provider"~\n~  android:exported="false"~\n~  android:grantUriPermissions="true">~\n~  <meta-data~\n~  android:name="android.support.FILE_PROVIDER_PATHS"~\n~  android:resource="@xml/provider_paths"/>~\n~  </provider>~\n~)~\n~CreateResource(xml, provider_paths,~\n~   <external-files-path name="name" path="shared" />~\n~)~\n~~\n~ 
    Module1=f
    Module10=KeyValueStore
    Module11=CameraExClass
    Module12=Charts
    Module13=WebGetCodigo
    Module14=AnotherDatePicker
    Module15=SearchView
    Module16=WebPedEnc
    Module17=Webgetclientes
    Module18=Webgetfechaserver
    Module19=SignatureCapture
    Module2=ContactsUtils
    Module20=Scrollinglabels
    Module21=WebPedDet
    Module22=WebGetRecibosDet
    Module23=WebRequestEstadoCta
    Module24=WebSendRecibo
    Module3=FileTransferOtroEquipo
    Module4=WebCxCFacturas
    Module5=dbxAuth
    Module6=StateManager
    Module7=WebgetRecibosEnc
    Module8=ClsCustomGallery
    Module9=Starter
    NumberOfFiles=
    241
    NumberOfLibraries=
    43
    NumberOfModules=
    24
    Version=
    9
    @EndOfDesignText@
     
  16. rafaelmotaquintana

    rafaelmotaquintana Active Member Licensed User

    Now I have a problem, I tried to use version 8, and B4A says Invalid email. I can't enter de IDE
     
  17. DonManfred

    DonManfred Expert Licensed User

    no problematik module.

    Try to clean the project. STRG-P and try compile again.
     
  18. rafaelmotaquintana

    rafaelmotaquintana Active Member Licensed User

    nothing

    B4A Version: 9.00
    Parsing code. Error
    Error parsing program.
    Error description: HttpUtils2Service is declared twice. You should either remove the library reference or the code module.

    I need to go back to version 8, so I guess I have to email support.
     
  19. DonManfred

    DonManfred Expert Licensed User

    do you have multiple okhttputils2 libs (maybe with other names) installed.

    Sorry, i´m out of ideas. Yes, best is to contact support@basic4ppc.com. Maye you can send him the complete project so he can check.
     
  20. rafaelmotaquintana

    rafaelmotaquintana Active Member Licensed User

    I Think I found it.
    Its libGoogledrive. When I remove it from the project, the error disappears, but of course, others not defined things appears, but the HttpUtils2Service is declared twice is gone.
    I dont know if there's a new google drive lib around, I'll search and disable this.
     

    Attached Files:

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