草庐IT

already-closed

全部标签

android - 即使在实现 close() 之后,也从未在数据库上显式调用 Close()

即使我已经实现了上述方法close(),Eclipse仍向我显示上述错误。代码如下:publicvoidupdate_project(Viewview){EditTextcinone=(EditText)findViewById(R.id.pname);pname=cinone.getText().toString();StringfDate=pday+"."+pmonth+"."+pyear;projectdatabasedbupdate=newprojectdatabase(UpdateProject.this);dbupdate.open();dbupdate.updatePro

java - HttpURLConnection.getRequestProperties() 抛出 IllegalStateException : "Already connected"

执行请求后,我想检查请求header,但它不起作用。我在sun.net.www.protocol.http.HttpURLConnection的一个实例上调用了getRequestProperties(),我总是收到IllegalStateException消息“已经连接”.好像我想设置请求属性。但我只想阅读它们。负责此行为的代码在HttpUrlConnection中:http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7u40-b43/sun/net/www/protocol/http/Http

android - 错误 : Program type already present: android. 支持.v4.os.ResultReceiver

当我尝试将我的应用程序连接到Firebase时出现此错误。下面是app/build.gradle中的依赖dependencies{implementationfileTree(dir:'libs',include:['*.jar'])implementation'androidx.appcompat:appcompat:1.0.0-alpha1'implementation'androidx.constraintlayout:constraintlayout:1.1.0'testImplementation'junit:junit:4.12'androidTestImplementat

android - 工厂 : Drawable already belongs to another owner

我在fragment上添加了两个float操作按钮,但总是出现以下错误:向LayerDrawable添加了无效的可绘制对象!Drawable已经属于另一个所有者,但不公开常量状态drawable->ic_edit_account.xmldrawable->ic_home_account.xmlbuild.gradleapplyplugin:'com.android.application'android{compileSdkVersion26defaultConfig{applicationId"com.atta"minSdkVersion23targetSdkVersion26ver

javascript - close window and open a new window 钛合金

我需要关闭windows2才能打开windows3。我有下一个代码:我是钛初学者,请帮助我。//Windows1.XMLCONTROLLER//Window1.jsfunctionopenWindows2(e){varWindow2=Alloy.createController('Window2').getView();newWindows.open();}$.Windows1.open()这段代码是我在windows1上用第一个Controller打开的第二个View//Window2.XMLController函数打开windows3//Window2.jsfunctionopen

android - 使用 FragmentStatePagerAdapater "The specified child already has a parent"错误

我已经尝试实现所有类似问题的一些解决方案,但它们似乎都不适用于我的情况。我的情况略有不同,因为我不是从xml获取surfaceview,而是通过SurfaceView类创建它并将其添加到FrameLayout。我这样做是因为我想在创建表面时使用媒体播放器。日志07-1211:02:28.221:E/AndroidRuntime(7055):FATALEXCEPTION:main07-1211:02:28.221:E/AndroidRuntime(7055):java.lang.IllegalStateException:Thespecifiedchildalreadyhasaparen

android - getPlaceByID() 总是失败并出现 java.lang.IllegalArgumentException : Buffer is closed

我正在使用GooglePlacesAPI,我需要使用地点ID检索地点详细信息。我正在尝试调用方法getPlaceById(),但它总是失败。这是日志:java.lang.IllegalArgumentException:Bufferisclosed.atcom.google.android.gms.common.data.DataHolder.zzg(UnknownSource)atcom.google.android.gms.common.data.DataHolder.zzi(UnknownSource)atcom.google.android.gms.common.data.zz

android - 当我尝试 adb install 时失败 [INSTALL_FAILED_ALREADY_EXISTS]

这个问题在这里已经有了答案:Failure[INSTALL_FAILED_ALREADY_EXISTS]whenItriedtoupdatemyapplication(7个答案)关闭8年前。apk没有出现在菜单或设置->应用程序->管理应用程序下,但是当我尝试使用adbinstall安装它时,我收到了这个错误[INSTALL_FAILED_ALREADY_EXISTS]。顺便说一句,我已经在我已经删除的其他模拟器上安装了相同的apk。我该如何解决这个问题?

android - 问题 : The specified child already has a parent. 您必须先在 child 的 parent 上调用 removeView()

我正在开发应用程序来向多个TableView添加动态数据。结构如下。我在onPostExecute中的代码是:protectedvoidonPostExecute(Listresults){intind,i=0;ScrollViewsv=null;TableLayouttl=null;TableRowtr=null;intmjsonlength=results.size();if(results!=null){TableLayoutindextl=(TableLayout)findViewById(R.id.indextablelayout);TableRowindextr=newTa

android - 来自 ContentProvider 的 SimpleCursorAdapter 中的 IllegalStateException "attempt to re-open an already-closed object"

我在Fragment中有一系列ListView对象,这些对象由CursorAdapter填充,它获得一个Cursor来自Activity的LoaderManager。据我了解,所有数据库和Cursor关闭操作都完全由LoaderManager和ContentProvider处理,因此在任何时候都不会代码我在任何事情上调用.close()。然而,有时我会得到这个异常:02-1911:07:12.308E/AndroidRuntime(18777):java.lang.IllegalStateException:attempttore-openanalready-closedobject: