草庐IT

Out-Null

全部标签

android - 在 fragment 中调用 getTag() 时总是返回 null

我有一个问题,因为当我在fragment中调用它时,getTag()方法返回null,fragment是我创建的ViewPager选项卡布局的一部分。代码importjava.util.ArrayList;importandroid.os.Bundle;importandroid.support.v4.app.Fragment;importandroid.support.v4.app.FragmentTransaction;importandroid.view.LayoutInflater;importandroid.view.View;importandroid.view.ViewG

android - Plus.PeopleApi.getCurrentPerson 返回 null

我目前正在开发我的应用中的GooglePlus登录功能。我像下面这样创建了GoogleApiClient构建器Plus.PlusOptionsoptions=newPlus.PlusOptions.Builder().addActivityTypes("http://schemas.google.com/AddActivity").build();myGoogleApiClient=newGoogleApiClient.Builder(this).addConnectionCallbacks(this).addOnConnectionFailedListener(this)//.add

android - ListView getChildAt() 返回 null

我一直在做一个android项目,但遇到了一个问题。我用谷歌搜索但没有找到答案。在我的项目中,有一个名为viewsurahfragment的fragment,它包含一个id为lv_showquran的ListView。我想在指定索引处突出显示ListView的View。我正在使用listview.getchildat()但它返回null值。这是viewsurahfragment的代码。发出不相关的函数。publicclassViewSurahFragmentextendsFragment{privateListViewlistView;privateintcurrentSurah;pr

【故障排查】dig通过coredns的svc IP,解析pod的fqdn出现connection timed out; no servers could be reached

环境信息:#另一个环境master1、master2、node1、node2k8s1.22、docker、calico、node2上有kuboard问题描述:dig通过coredns的svcIP,解析pod的fqdn出现connectiontimedout;noserverscouldbereached最终处理方法:删掉node2上的kuboard创建的网络。正常的状态:node2也有去往calico的路由信息了造成“故障”的操作为:至于为啥会故障/冲突,似懂非懂。(在创建了docker网络的情况下。容器不会走docker0的?!),node2有两个bridge排查方法(***):总结下排查方

Failed to connect to gitee.com port 443: Time out 连接超时提示【Bug已完美解决-鸿蒙开发】

文章目录项目场景:问题描述原因分析:解决方案:解决方案1解决方案2:解决方案3:此Bug解决方案总结解决方案总结**心得体会:解决连接超时问题的三种方案**项目场景:导入Sample时遇到导入失败的情况,并提示“Failedtoconnecttogitee.comport443:Timeout”连接超时。或者

java.lang.IllegalArgumentException: Cannot pass null or empty values to constructor at org.springf

 java.lang.IllegalArgumentException:Cannotpassnulloremptyvaluestoconstructor   atorg.springframework.security.core.userdetails.User.(User.java:113)   atorg.springframework.security.core.userdetails.User$UserBuilder.build(User.java:535)   atcom.example.mz.spingsecurity_jwt_deepstudy.SpingsecurityJwtD

android - java.net.socketexception : The operation timed out problem in android?

在我的应用程序中,我编写了用于连接到如下URL的代码InputStreaminputStream=newURL(url).openStream();我收到了错误。我正在发送我的logcat12-1715:06:55.065:WARN/System.err(4952):java.net.SocketException:Theoperationtimedout12-1715:06:55.065:WARN/System.err(4952):atorg.apache.harmony.luni.platform.OSNetworkSystem.connectStreamWithTimeoutSo

使用git遇到 git connection timed out 全新解决方式

项目场景:常规git操作遇到连接超时问题例如:gitpull或者gitpush等等一系列操作,无论怎么设置,始终显示gitconnectiontimedout!瞬间觉得github****,其实可能是我们没搞懂他,看下面即可帮你搞定连接超时的问题!问题描述突然遇到connectiontimedout搜索网上常规的解决方案(设置https代理和设置连接github的端口20/443)都无法解决超时问题!原因分析:突然遇到gitconnectiontimedout一般有点经验的都会第一时间想到是网络问题,这一点绝对没错,确实是网络问题导致,但是!!!你发现用代理了,依然还是会gitconnecti

android - View.findViewById() 返回 null

我有这个代码:privatevoidinflateMenu(){if(menu==null){mFanView=(LinearLayout)findViewById(R.id.fanView);finalViewv=LayoutInflater.from(getContext()).inflate(R.layout.sidemenu,mFanView);menu=(MenuView)v.findViewById(R.id.listViewMenu);}menu.setColors(backgroundColor,selectedColor,unselectedColor);}调试时,v

android - Intent 始终为 null onStartCommand

我有以下代码@OverridepublicintonStartCommand(Intentintent,intflags,intstartId){if(intent!=null){Log.i("INTENT",intent.getAction().toString());}returnSTART_STICKY;}但它总是在线返回NullPointerException:Log.i("INTENT",intent.getAction().toString());为什么?我在上面检查“intent”变量是否不为空。如果是这种情况,请执行以下代码。但我仍然遇到nullpointerexcep