Giter Site home page Giter Site logo

Comments (6)

JessYanCoding avatar JessYanCoding commented on May 18, 2024

这不符合 Retrofit 定义的 BaseUrl 格式,正确格式如: "https://api.github.com" 后面不能加 "/"

from retrofiturlmanager.

zhzhh7378 avatar zhzhh7378 commented on May 18, 2024

长时间后台运行后重新回到主界面设置的全局baseUrl失效

from retrofiturlmanager.

JessYanCoding avatar JessYanCoding commented on May 18, 2024

@zhzhh7378 那你要打断点查看,存放 baseUrl 的容器是否存在,并且是否有值,如果没值,是因为 App 在后台后被系统杀死,导致内存中存放的对象不存在,这些东西都需要你自行去处理,这个情况和框架没有任何关系,你存放任何东西在内存中,都可能在被系统杀死后被销毁

from retrofiturlmanager.

JessYanCoding avatar JessYanCoding commented on May 18, 2024

@zhzhh7378 我最多可以提供给你,当框架完成从 baseUrl 容器中取 DomainName 所映射 baseUrl 操作之前的一个回调,可以在回调中判断容器中所需要的 baseUrl 是否为 Null ,如果为 Null ,则重新

普通 BaseUrl:
RetrofitUrlManager.getInstance().putDomain(String,String); 
全局 BaseUrl:
RetrofitUrlManager.getInstance().setGlobalDomain(String);

只要保证容器中有对应的 baseUrl, 就不会失效

from retrofiturlmanager.

JessYanCoding avatar JessYanCoding commented on May 18, 2024

@zhzhh7378 b2863ef

新版本 v1.1.0 已经更新了上面所说的回调

from retrofiturlmanager.

mybirthfather avatar mybirthfather commented on May 18, 2024

长时间后台运行后重新回到主界面设置的全局baseUrl失效

我也会失效 你是怎么解决的? clone源码 自己改的么?

from retrofiturlmanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.