Android java.lang.IllegalArgumentException

Android java.lang.IllegalArgumentException,第1张

概述这可能是一个简单的答案,但我似乎无法正确,并认为我会问. 我收到了 java.lang.IllegalArgumentException和java.lang.NullPointerException 这是错误日志 03-20 13:13:22.872: E/SurfaceTextureClient(565): dequeueBuffer failed (No such device) 03-20 这可能是一个简单的答案,但我似乎无法正确,并认为我会问.
我收到了 java.lang.IllegalArgumentException和java.lang.NullPointerException

这是错误日志

03-20 13:13:22.872: E/SurfaceTextureClIEnt(565): dequeueBuffer Failed (No such device) 03-20 13:13:22.879: E/BaseSurfaceHolder(565): Exception locking surface 03-20 13:13:22.879: E/BaseSurfaceHolder(565): java.lang.IllegalArgumentException 03-20 13:13:22.879: E/BaseSurfaceHolder(565): at androID.vIEw.Surface.lockCanvasNative(Native Method) 03-20 13:13:22.879: E/BaseSurfaceHolder(565):  at androID.vIEw.Surface.lockCanvas(Surface.java:76) 03-20 13:13:22.879: E/BaseSurfaceHolder(565):  at com.androID.internal.vIEw.BaseSurfaceHolder.internalLockCanvas(BaseSurfaceHolder.java:184) 03-20 13:13:22.879: E/BaseSurfaceHolder(565):  at com.androID.internal.vIEw.BaseSurfaceHolder.lockCanvas(BaseSurfaceHolder.java:161) 03-20 13:13:22.879: E/BaseSurfaceHolder(565):  at ca.watercity.CityActivity$Blimp.render(CityActivity.java:235) 03-20 13:13:22.879: E/BaseSurfaceHolder(565):  at ca.city.CityActivity$CityThread.run(CityActivity.java:580) 03-20 13:13:22.879: W/dalvikvm(565): threadID=11: thread exiting with uncaught exception (group=0x409c01f8) 03-20 13:13:22.889: E/AndroIDRuntime(565): FATAL EXCEPTION: Thread-79 03-20 13:13:22.889: E/AndroIDRuntime(565): java.lang.NullPointerException 03-20 13:13:22.889: E/AndroIDRuntime(565):     at ca.city.CityActivity$Blimp.render(CityActivity.java:237) 03-20 13:13:22.889: E/AndroIDRuntime(565):     at ca.city.CityActivity$CityThread.run(CityActivity.java:580) 03-20 13:26:12.633: E/AndroIDRuntime(564): java.lang.NullPointerException

这是它影响的两行代码.

public voID render(){            Canvas canvas = null;            try{                // line 235                canvas = this._surfaceHolder.lockCanvas(null);                synchronized (this._surfaceHolder) {                    canvas.save();                    this.onDraw(canvas);                    canvas.restore();                }            }finally{                if(canvas != null){                    this._surfaceHolder.unlockCanvasAndPost(canvas);                }            }           }

这些代码行.

@OverrIDe        public voID run() {            while(this._running){                this._blimp.render();            }        } // line 580

任何帮助都将非常感谢.
先感谢您.

解决方法 您将null传递给SurfaceHolder.lockCanvas.您希望使用lockCanvas()的无参数版本,假设您没有想要被视为脏的矩形. 总结

以上是内存溢出为你收集整理的Android java.lang.IllegalArgumentException全部内容,希望文章能够帮你解决Android java.lang.IllegalArgumentException所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1124474.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存