Arouter 报错There is no route match the path

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_41759092/article/details/83340172

ARouter.openDebug()
ARouter.openLog()
再测试运行的时候,一定要加上这两句话

// It will rebuild router map every times when debuggable.
                if (ARouter.debuggable() || PackageUtils.isNewVersion(context)) {
                    logger.info(TAG, "Run with debug mode or new install, rebuild router map.");
                    // These class was generate by arouter-compiler.
                    routerMap = ClassUtils.getFileNameByPackageName(mContext, ROUTE_ROOT_PAKCAGE);
                    if (!routerMap.isEmpty()) {
                        context.getSharedPreferences(AROUTER_SP_CACHE_KEY, Context.MODE_PRIVATE).edit().putStringSet(AROUTER_SP_KEY_MAP, routerMap).apply();
                    }

                    PackageUtils.updateVersion(context);    // Save new version name when router map update finish.
                } else {
                    logger.info(TAG, "Load router map from cache.");
                    routerMap = new HashSet<>(context.getSharedPreferences(AROUTER_SP_CACHE_KEY, Context.MODE_PRIVATE).getStringSet(AROUTER_SP_KEY_MAP, new HashSet<String>()));
                }

看源码可知 在LogisticsCenter的类中通过下面的语句判断
if (ARouter.debuggable() || PackageUtils.isNewVersion(context))
是否添加对应索引,如果不是DEBUG,并且不是新版本,就不会生成对应索引,导致查询不到要显示的内容

展开阅读全文

java.net.SocketException: No route to host报错

07-09

新手求教,报错LOG如下:rnjava.net.SocketException: No route to hostrnat org.apache.harmony.luni.platform.OSNetworkSystem.connect(Native Method)rnat dalvik.system.BlockGuard$WrappedNetworkSystem.connect(BlockGuard.java:357)rnat org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:207)rnat org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:440)rnat java.net.Socket.connect(Socket.java:1013)rnat org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.(HttpConnection.java:75)rnat org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.(HttpConnection.java:48)rnat org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection$Address.connect(HttpConnection.java:322)rnat org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:89)rnat org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHttpConnection(HttpURLConnectionImpl.java:285)rnat org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.makeConnection(HttpURLConnectionImpl.java:267)rnat org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:205)rnrn报错的代码段:rn[code=java]URL url = new URL(validateUrl);rnconn = (HttpURLConnection) url.openConnection();rnconn.setConnectTimeout(5000);rnconn.setRequestMethod("GET"); // 请求格式rnconn.connect();//在这报错[/code]rn手机移动网开着呢, 也加上了。rn[b]出现这种情况一般是什么问题啊?[/b] 论坛

Boost filesystem path 链接报错

09-28

error LNK2019: unresolved external symbol "private: static class stlpd_std::codecvt const * & __cdecl boost::filesystem3::path::wchar_t_codecvt_facet(void)" (?wchar_t_codecvt_facet@path@filesystem3@boost@@CAAAPBV?$codecvt@_WDH@stlpd_std@@XZ) referenced in function "public: static class stlpd_std::codecvt const & __cdecl boost::filesystem3::path::codecvt(void)" (?codecvt@path@filesystem3@boost@@SAABV?$codecvt@_WDH@stlpd_std@@XZ)rn1>Test.obj : error LNK2019: unresolved external symbol "void __cdecl boost::filesystem3::path_traits::convert(char const *,char const *,class stlpd_std::basic_string,class stlpd_std::allocator > &,class stlpd_std::codecvt const &)" (?convert@path_traits@filesystem3@boost@@YAXPBD0AAV?$basic_string@_WV?$char_traits@_W@stlpd_std@@V?$allocator@_W@2@@stlpd_std@@ABV?$codecvt@_WDH@5@@Z) referenced in function "void __cdecl boost::filesystem3::path_traits::dispatch,class stlpd_std::allocator > >(class stlpd_std::basic_string,class stlpd_std::allocator > const &,class stlpd_std::basic_string,class stlpd_std::allocator > &,class stlpd_std::codecvt const &)" (??$dispatch@V?$basic_string@_WV?$char_traits@_W@stlpd_std@@V?$allocator@_W@2@@stlpd_std@@@path_traits@filesystem3@boost@@YAXABV?$basic_string@DV?$char_traits@D@stlpd_std@@V?$allocator@D@2@@stlpd_std@@AAV?$basic_string@_WV?$char_traits@_W@stlpd_std@@V?$allocator@_W@2@@4@ABV?$codecvt@_WDH@4@@Z)rnrnrn我的Boost 版本是1.47, rn比如 我 path p("c:/test.txt")rn就会出现上述错误,谁能帮帮我啊? 论坛

没有更多推荐了,返回首页