草庐IT

Custom_Exception

全部标签

android - 功能自定义标题 : Cannot combine custom titles on API 11 and above

我有一个项目,我设置了:minSdkversion设置为10MainActivity是一个TabActivityonCreate方法中的代码是这样的:super.onCreate(savedInstanceState);requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);setContentView(R.layout.main);getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,R.layout.custom_title);...使用之前的设置,一切正常!但是,如果我将minSdk

java - Android OkHttp 库 : GET Request - Exception EOFException:\n not found: size=0 content=

我在我的应用程序OkHttp库(http://square.github.io/okhttp/)中使用,在一个简单的GET请求中我得到了这个异常:Causedby:java.io.EOFException:\nnotfound:size=0content=...atokio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:201)atcom.squareup.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:191)...u

Android 主题实现最简单的问题 : custom per theme color

我是Android开发的初学者,尽管编码很合理,但恕我直言,android主题不是我无法执行这个简单的任务:我有(例如)一种名为“blah”的颜色#F0F0F0它在XML布局或代码中无处不在,并被不同的View组件用作“@color/blah”我只想让这个每个主题改变颜色值所以当我使用MyTheme1时,blah应该是#F0F0F0,而当我使用MyTheme2时,blah应该是#00FF00我一直在阅读有关主题的内容,但仍然无法找到如何实现这个简单的任务,因为我的应用不需要特殊样式等,只需要每个主题的颜色。提前致谢更新:在Mohamed_AbdAllah提供的链接之后,我成功地创建了一

java - 协调器布局 : View disappears with custom behavior

我是CoordinatorLayout的新手,这是我在CoordinatorLayout中遇到的一个非常奇怪的行为。我有一个ImageView(或更多特别是ImageView的一个子类,称为CircleImageView(它在此处的中心放置个人资料图片))作为的子类之一CoordinatorLayout。我已将此CircleImageView锚定到AppbarLayout(这是CoordinatorLayout的另一个子项)。这是我的整个布局:到目前为止一切顺利。我目前能够滚动AppbarLayout并且NestedScrollView会随之移动。但是,我想在我们向上滚动时将个人资料图

安卓 OAuth : Exception on retrieveAccessToken()

我正在为我的Android应用设置OAuth。为了测试它,我做了以下事情:将signpost-core-1.2.1.1.jar和signpost-commonshttp4-1.2.1.1.jar添加到我的项目中,添加了变量“CommonsHttpOAuthConsumerconsumer”和“CommonsHttpOAuthProviderprovider”,并在单击按钮时执行以下操作:consumer=newCommonsHttpOAuthConsumer("xxx","yyy");provider=newCommonsHttpOAuthProvider("https://api.t

java - ZXing条码阅读器: How to make custom border around capture screen?

我想在zxing捕获屏幕(相机屏幕)周围放置自定义边框。我需要为此做哪些修改?我需要更改哪些Activity和布局才能产生这种效果? 最佳答案 您根本不需要编辑布局。在ViewfinderView中找到onDraw方法。它是绘制“扫描矩形”的核心。你可以按照你想要的方式修改它。可以找到实际绘制矩形的代码here://Drawtheexterior(i.e.outsidetheframingrect)darkenedpaint.setColor(resultBitmap!=null?resultColor:maskColor);can

java - 安卓开发 : "thread exiting with uncaught exception"

我正在尝试创建我的第一个Android应用程序(游戏),但我在开始时遇到了一些困难。当我运行我的代码时,我得到这个错误日志:05-2502:41:51.022:WARN/dalvikvm(634):threadid=1:threadexitingwithuncaughtexception(group=0x4001d800)05-2502:41:51.040:ERROR/AndroidRuntime(634):FATALEXCEPTION:main05-2502:41:51.040:ERROR/AndroidRuntime(634):java.lang.RuntimeException:

android - 失败 : Build failed with exception

>Executingtasks:[:app:assembleDebug]>>WARNING:Theoption'android.enableAapt2'isdeprecatedandshouldnot>beusedanymore.Use'android.enableAapt2=true'toremovethis>warning.Itwillberemovedattheendof2018.:app:preBuild>UP-TO-DATE:app:preDebugBuildUP-TO-DATE:app:compileDebugAidl>UP-TO-DATE:app:compileDebug

android - Flutter 应用抛出 Http Exception 并立即崩溃

目前我在运行flutter应用程序时遇到问题。我试图寻找解决方案,但实际上都不是我的情况。问题是,当我尝试安装应用程序时,有时它开始运行,但立即崩溃,甚至无法构建,并抛出此异常(即使使用flutter演示项目):Errorconnectingtotheserviceprotocol:HttpException:Connectionclosedbeforefullheaderwasreceived,uri=http://127.0.0.1:57564/ws".到目前为止我已经尝试过:清理现金,重新安装Flutter/androidstudio。我只在少数(androidos)手机上遇到了

android - Flutter 应用抛出 Http Exception 并立即崩溃

目前我在运行flutter应用程序时遇到问题。我试图寻找解决方案,但实际上都不是我的情况。问题是,当我尝试安装应用程序时,有时它开始运行,但立即崩溃,甚至无法构建,并抛出此异常(即使使用flutter演示项目):Errorconnectingtotheserviceprotocol:HttpException:Connectionclosedbeforefullheaderwasreceived,uri=http://127.0.0.1:57564/ws".到目前为止我已经尝试过:清理现金,重新安装Flutter/androidstudio。我只在少数(androidos)手机上遇到了