草庐IT

null_unspecified

全部标签

android - java.io.IOException : Received authentication challenge is null in ICS 4. 0.3

我正在尝试从服务器注销。但它返回“0”响应代码,但有此异常。我正在使用GET动词来执行此操作。LogCat10-1714:54:13.261:W/System.err(868):java.io.IOException:Receivedauthenticationchallengeisnull10-1714:54:13.284:W/System.err(868):atlibcore.net.http.HttpURLConnectionImpl.processAuthHeader(HttpURLConnectionImpl.java:397)10-1714:54:13.284:W/Syst

java - 安卓.view.WindowManager$BadTokenException : Unable to add window — token null is not valid

每当我尝试启动我的窗口类时,我都会收到此错误。我正在使用单独的类,而不仅仅是我的游戏类中的一个方法,因为我需要禁用该弹出窗口上的后退按钮。我用一个按钮调用这个类。如果我在我的游戏类中使用此代码,但在单独的类中不使用,则此代码可以正常工作。这是我的代码:publicclassPopup_pogresnoextendsActivityimplementsOnClickListener{privatePopupWindowpwindow;@OverrideprotectedvoidonCreate(BundlesavedInstanceState){//TODOAuto-generatedm

android - Handler.removeCallbacksAndMessages(null) 和主循环程序

在fragment的onDestory中,我放置了代码来清理我开始使用Handler.postDelayed的所有挂起的可运行对象。mUiHandler.removeCallbacksAndMessages(null);我有一个问题。调用mUiHandler.removeCallbacksAndMessages(null);安全吗?我的理解是,Android在主循环器中执行所有UI操作,如UI布局、UI渲染、组件生命周期(onCreate、onPause、onResume)。我理解正确吗?然后,当我在fragment中调用mUiHandler.removeCallbacksAndMes

java.lang.IllegalStateException: Type handler was null on parameter mapping for property ‘__frch_ite

今天做项目遇到了IllegalStateException以下是报错:2023-08-3112:54:39.429ERROR12230---[nio-8080-exec-2]o.a.c.c.C.[.[.[/].[dispatcherServlet]:Servlet.service()forservlet[dispatcherServlet]incontextwithpath[]threwexception[Requestprocessingfailed;nestedexceptionisorg.mybatis.spring.MyBatisSystemException:nestedexcept

android - 改造响应在 Android 中返回 null

我想显示来自JSON值的文本。我正在使用Retrofit进行API调用我不知道我做的是否正确。不管怎样,这是我的代码。这是url链接:http://api.icndb.com/jokes/random.网站每次都会显示一个随机笑话。以下是网站输出的示例:{"type":"success","value":{"id":175,"joke":"WhenChuckNorriswasababy,hedidn'tsuckhismother'sbreast.Hismotherservedhimwhiskey,straightoutofthebottle.","categories":[]}}fra

安卓:bitmapfactory.decodestream 返回 null

我试图从图像的路径中获取位图图像。但是BitmapFactory.decodeStream返回null值。代码:URLurl=newURL(path);HttpURLConnectionconnection=(HttpURLConnection)url.openConnection();connection.setDoInput(true);connection.connect();InputStreaminput=connection.getInputStream();BitmapmyBitmap=BitmapFactory.decodeStream(input);connectio

android - SDK 更新到 5.0 后 getActionBar() 返回 null

在我将AndroidSDK更新到版本5.0之后,getActionBar()方法开始返回null,导致我的应用程序在启动时崩溃。我不知道是什么原因造成的,任何现有的Stackoverflow线程都没有帮助。这是我的list:样式.xml:8dp5dp8dp5dp主题.xml:@style/ActionBar@style/OverflowButton@style/ActionBar@style/OverflowButton@drawable/menu@color/main@color/main和我的gradle依赖项:dependencies{compile'com.github.jen

android - geocoder.getFromLocationName 仅返回 null

在过去的两天里,我因IllegalArgumentException而失去理智当我试图从地址中获取坐标时,我在Android代码中收到错误,或者甚至相反,从经度和纬度中获取地址。这是代码,但我看不到错误。它是一个标准的代码fragment,很容易在Google搜索中找到。publicGeoPointdetermineLatLngFromAddress(ContextappContext,StringstrAddress){Geocodergeocoder=newGeocoder(appContext,Locale.getDefault());GeoPointg=null;try{Sys

android - 来自 TextView (getDrawingCache) 的位图始终为 null

我正在尝试提取与显示的TextView实例关联的位图,但它总是返回空值。我究竟做错了什么?我应该改用textview.draw(canvas)吗?TextViewtextview=(TextView)findViewById(R.id.text_title);textview.setDrawingCacheEnabled(true);textview.buildDrawingCache();Bitmapbmp=textview.getDrawingCache(); 最佳答案 在获取绘图缓存之前执行此操作将解决问题view.measu

android - 启用滚动时调用 `getDrawingCache` 返回 null

此代码中缺少什么?同样的代码适用于ICS。在API8上,滚动出现并且一些内容从屏幕上消失。这种情况下如何获取绘图缓存?代码:TableLayoutpage=(TableLayout)findViewById(R.id.page);page.setDrawingCacheEnabled(true);page.buildDrawingCache();//getDrawingCachereturnsnull...BitmappageBmp=Bitmap.createBitmap(page.getDrawingCache(true));page.destroyDrawingCache();pa