草庐IT

realm-browser

全部标签

Android - Realm - 对象删除 - 对象不再有效以进行操作

我正在尝试从Realm数据库中填充的RecyclerView中删除一个项目,但出现以下错误:java.lang.IllegalStateException:IllegalState:Objectisnolongervalidtooperateon.Wasitdeletedbyanotherthread?假设我想我正在尝试在它已被删除时访问,但我不明白在哪里。上下文:我正在显示一个城市列表,长按一个项目会显示一个对话框,要求确认删除。该项目已从数据库中删除,因为当我重新启动该应用程序时,它已不存在了。Realm到ArrayListpublicstaticArrayListgetStore

npm install 提示Unable to authenticate, need: BASIC realm=“Sonatype Nexus Repository Manager“

场景:执行npminstall时提示UnabletoauthenticatePassword:Email:(thisISpublic)xx@qq.comLoggedinasuploaderonhttp://192.168.xx.xxx:8074/repository/npm-internal/.PSD:\GitworkspaceUi\gisquest-cloud-ui-workcenter>npminstallnpmERR!codeE401npmERR!Unabletoauthenticate,need:BASICrealm="SonatypeNexusRepositoryManager"np

npm install 提示Unable to authenticate, need: BASIC realm=“Sonatype Nexus Repository Manager“

场景:执行npminstall时提示UnabletoauthenticatePassword:Email:(thisISpublic)xx@qq.comLoggedinasuploaderonhttp://192.168.xx.xxx:8074/repository/npm-internal/.PSD:\GitworkspaceUi\gisquest-cloud-ui-workcenter>npminstallnpmERR!codeE401npmERR!Unabletoauthenticate,need:BASICrealm="SonatypeNexusRepositoryManager"np

Android Realm - findAll 返回带有空参数的对象

这个问题在这里已经有了答案:Cannotretrievefieldvaluesfromrealmobject,valuesarenullindebugger(5个答案)关闭5年前。我需要在Realm中做一个简单的查询,检索MyModel对象的列表,然后在我的应用程序的其他地方使用它。碰巧一旦我查询Realm,每个对象都有空值,但toString返回预期值。型号:@RealmClasspublicclassMyModelextendsRealmObjectimplementsSerializable{publicstaticfinalStringKEY_MODEL="key_myMode

java - Android Realm 存储 int[] 和 String[]

有没有一种方法可以存储int[]和String[],而不是创建一个包含它们的新对象,然后将其存储在realmList中我有一个对象,它接受字符串、int[]和String[]的参数。你不能在Realm中存储int[]和String[],所以我做了一个对象publicclassWorkoutsextendsRealmObject{privateStringworkout;publicWorkouts(){}publicWorkouts(Stringworkout){this.workout=workout;}publicStringgetWorkout(){returnworkout;}

android - 从 realm.io 中删除项目发生了什么? Realm 异常 "Removing object is not supported."?

我正在尝试根据查询从Realm.io数据库中删除最后一个对象,如下所示:Realmrealm=Realm.getInstance(this);finalRealmResultsdatabaseLocations=realm.where(RealmCustomLocation.class).findAllSorted("timeStamp",RealmResults.SORT_ORDER_DESCENDING);if(databaseLocations.size()>=4){realm.beginTransaction();databaseLocations.removeLast();r

Android Realm - 使用 Intent 传递 Realm 对象

我想将Realm对象从一个Activity传递到另一个Activity。例如Intentintent=newIntent(MainActivity.this,Second.class);intent.putExtra("Student",studentObj);//studentObjisarealmobjectstartActivity(intent);并从第二个Activity中接收它Intenti=getIntent();student=(Student)i.getSerializableExtra("Student");但这会导致空指针异常。java.lang.RuntimeE

android - 如何将 Realm 安装为 gradle 依赖项?

我对Realm完全陌生。我想在我的android项目中使用realmdb。我通过了官方Realmdocumentation.我需要在我的android项目中设置Realm。为此,我将gradle依赖项添加为buildscript{repositories{jcenter()}dependencies{classpath"io.realm:realm-gradle-plugin:0.88.2"}}applyplugin:'realm-android'这是他们在文档中给出的内容。但这对我不起作用。它给出错误提示Pluginwithid'realm-android'notfound。这是我的

Android 帮助 : How do open a remote Video file URL to play in MediaPlayer without having to open a browser window?

如何在不打开浏览器窗口的情况下通过单击按钮打开远程视频文件URL以在内部MediaPlayer中播放?视频播放正常,但它总是首先打开一个浏览器窗口,这很烦人。这是我已经在使用的,但是否可以在应用程序不先打开浏览器窗口的情况下启动媒体播放器。希望有人能帮忙谢谢露西finalButtonbutton=(Button)findViewById(R.id.play);button.setOnClickListener(newButton.OnClickListener(){publicvoidonClick(Viewv){//PerformactiononclickUriuri=Uri.par

android - 无法从 Realm 对象检索字段值,调试器中的值为空

我的RealmObject值似乎被RealmProxy类隐藏了,但可以从代理类中设置。如您所见,我的模型非常简单。publicclassGroupRealmextendsRealmObject{@PrimaryKeypublicStringid;@IndexpublicStringname;publicStringimageUrl;publicintorder;publicGroupRealmparent;publicRealmListchildren;publicRealmListcontents;}这就是我设置值的方式(db是一个有效的Realm,并且一切都在一个提交良好的事务中)