草庐IT

jazn-data

全部标签

Android 光标错误 - "make sure cursor is initialized correctly before accessing data from it..."

我有一个Activity,其中一个viewflipper显示一个列表,其中包含来自mediastore的艺术家,单击该项目会显示所选艺术家的专辑列表,而该列表又会显示该专辑中的歌曲。单击一首歌曲后,它应该使用字符串“title”填充TextView。直到此时,所有的游标都工作正常,但最后一个似乎不知何故错位了。谁能告诉我为什么logcat告诉我:05-0723:58:54.195:E/AndroidRuntime(1961):java.lang.IllegalStateException:Couldn'treadrow3,col-1fromCursorWindow.Makesureth

具有自定义 View 的 Android AlertDialog : get input data

我有一个带有显示单个EditText的AlertDialog的应用程序。我按照Android开发人员指南进行了操作,但找不到如何获取用户输入的数据。自定义布局只有一个EditText:我正在使用DialogFragment创建对话框。为了在用户单击确定按钮时取回数据,我使用了一个界面。publicclassEditLicenseDialogFragmentextendsDialogFragment{publicinterfaceEditLicenseDialogListener{publicvoidonDialogPositiveClick(DialogFragmentdialog,S

android - 亚行 : error: remote object '/data/data/com.me.myproject' does not exist

1.添加adb路径到~/.bash_profileexportPATH="/Users/myname/Library/Android/sdk/platform-tools:$PATH"2.登录模拟器adb-semulator-5554shell3.修改app文件夹和父文件夹的权限chmod777/data/data/com.me.myprojectchmod777/data/data4.仍然无法从外面得到东西。为什么?adb-semulator-5554pull/data/data/com.me.myproject 最佳答案 我遇到

android - 蓝牙外设 ADVERTISE_FAILED_DATA_TOO_LARGE

我正在尝试在NEXUS9中做广告并收到ADVERTISE_FAILED_DATA_TOO_LARGE错误。当我在成功转换广告后添加服务时,它工作得非常好,但是如果我通过广告数据生成器添加服务以便在扫描时其他设备可以过滤,我会收到错误代码1,即ADVERTISE_FAILED_DATA_TOO_LARGEa)工作代码publicvoidstartAdvertisingService(){AdvertiseSettingssettings=newAdvertiseSettings.Builder().setTxPowerLevel(AdvertiseSettings.ADVERTISE_T

Android Data Binding - 引用 View

我在我的新应用中使用了android的数据绑定(bind)库。目前我尝试将另一个View的引用传递给一个方法。我有一个带有onClickListener的ImageButton。在这个onClick监听器中,我想将RootView的引用传递给该方法。Helper.doSth(root_element)}"/>上面提供的源代码只是一个例子,并不完整。有更多的子元素,图像按钮也不是根元素的直接子元素。但我认为意思很明确。我已经尝试通过指定RootView的ID来传递引用(见上文)。但这不起作用。如果我尝试编译它,我会收到错误消息,即未指定root_element的类型。我还尝试导入生成的绑

Android 模拟器错误 "emulator: ERROR: the user data image is used by another emulator. aborting"

这个问题在这里已经有了答案:关闭11年前。PossibleDuplicate:EmulatorprobleminAndroid模拟器:错误:用户数据图像被另一个模拟器使用。中止大多数时候我都遇到这个问题..我什至重新启动Eclipse..并重新启动模拟器..但问题仍然存在。为什么?

android - react native 异常 java.lang.UnsatisfiedLinkError : dlopen failed: "/data/data/{package}/lib-main/libgnuSTL_shared.so" is 32-bit instead of 64-bit

我正在尝试将ReactNative与我现有的Android应用程序集成。初始化ReactNativeScreen时出现以下异常:java.lang.UnsatisfiedLinkError:dlopenfailed:"/data/data/com.snapdeal.main/lib-main/libgnustl_shared.so"is32-bitinsteadof64-bit应用程序仅在64位设备上崩溃。根据我目前的学习,我找到了这个issue在ReactNativeRepo上报告,但是solution此线程中的建议没有帮助,因为我没有在现有应用程序中使用任何外部SO库。除上述之外,

android - 三星 S3 中 onActivityResult(int requestCode, int resultCode, Intent data) 中的相机 Intent 数据为空

问题:我在SamsungS3的onActivityResult(intrequestCode,intresultCode,Intentdata)中获取相机Intent的数据为空。但在其他一些设备上运行良好。我定制了我的代码来获取数据并在网络上搜索了这个问题,但没有找到有用的东西。代码:protectedvoidonActivityResult(intrequestCode,intresultCode,Intentdata){if(requestCode==TAKE_CAMERA&&data!=null&&data.getData()!=null)elseif(requestCode==

android - 错误 :Data Binding does not support Jack builds yet

我正在实现DataBinding,它运行良好,但它不允许我使用jackOptions。它在构建时抛出错误DataBindingdoesnotsupportJackbuildsyet。这是我的build.gradleandroid{defaultConfig{...dataBinding{enabledtrue}jackOptions{enabledtrue}}compileOptions{sourceCompatibilityJavaVersion.VERSION_1_8targetCompatibilityJavaVersion.VERSION_1_8}}

android - Espresso 。执行错误 'load adapter data'

我有一个ListView,它显示来自数据库的数据。db=newDB(this);db.open();String[]from=newString[]{DB.COLUMN_FIRSTNAME,DB.COLUMN_LASTNAME};int[]to=newint[]{android.R.id.text1,android.R.id.text2};scAdapter=newSimpleCursorAdapter(this,android.R.layout.simple_list_item_activated_2,null,from,to,0);lvData=(ListView)findView