草庐IT

context_type

全部标签

java - 错误 : java. lang.UnsupportedOperationException:无法转换为维度:type=0x3

这个问题在这里已经有了答案:UnsupportedOperationException:Can'tconverttodimension:type=0x1(14个答案)关闭3年前。我正在为android制作一个简单的应用程序。但是如果我想运行我的应用程序,我会收到错误消息:08-1509:39:33.050:E/AndroidRuntime(871):FATALEXCEPTION:main08-1509:39:33.050:E/AndroidRuntime(871):Process:com.a3gaatleren,PID:87108-1509:39:33.050:E/AndroidRun

android - 数据绑定(bind)编译器错误 : "Cannot resolve type for SafeVarargs"

我已经尝试让Android数据绑定(bind)工作2天了,它是一个接一个的编译器问题,现在我完全碰壁了。我用谷歌搜索了这个,没有找到任何东西。这是完整的日志:java.lang.RuntimeException:failure,seelogsfordetails.cannotgenerateviewbindersjava.lang.RuntimeException:failure,seelogsfordetails.CannotresolvetypeforSafeVarargsatandroid.databinding.tool.util.L.printMessage(L.java:1

android - context.registerReceiver 在尝试检查电源是否已连接时返回 null Intent

我正在尝试检查Android设备是否已连接电源。以下是逻辑(基于Commonsware的stackoverflow帖子),Intentintent=context.registerReceiver(null,newIntentFilter(Intent.ACTION_BATTERY_CHANGED));plugged=intent.getIntExtra(BatteryManager.EXTRA_PLUGGED,-1);它大部分工作正常。然而,根据Crashlytics报告,在某些情况下,返回的Intent为空,导致应用程序崩溃。我从来没有能够在我的手机上重现它。只是想知道在什么情况下

android - 错误 : incompatible types: View cannot be converted to TextView and Error:Execution failed for task ':app:compileDebugJavaWithJavac'

我是Android编程的新手,正在尝试使用以下JavaActivity代码创建应用,所以在com.ezbatech.healthtips中我有,主要Activity.java:importandroid.content.Intent;importandroid.support.v7.app.AppCompatActivity;importandroid.os.Bundle;importandroid.view.View;importandroid.widget.EditText;publicclassMainActivityextendsAppCompatActivity{static

android - 如何修复 "Program type already present: androidx.concurrent.futures.DirectExecutor"

迁移到AndroidX后,由于迁移,我遇到了以下问题:失败:构建失败,出现异常。出了什么问题:任务“:app:transformDexArchiveWithExternalLibsDexMergerForDebug”执行失败。com.android.builder.dexing.DexArchiveMergerException:Errorwhilemergingdexarchives:/home/lexy/AndroidStudioProjects/Testbucks/app/build/intermediates/transforms/dexBuilder/debug/0.jar,

Android 崩溃,java.lang.IllegalArgumentException : Window type can not be changed after the window is added

我向市场上传了一个Android应用程序,但出于某种原因,用户遇到了这个错误。java.lang.IllegalArgumentException:Windowtypecannotbechangedafterthewindowisadded.atandroid.os.Parcel.readException(Parcel.java:1331)atandroid.os.Parcel.readException(Parcel.java:1281)atandroid.view.IWindowSession$Stub$Proxy.relayout(IWindowSession.java:664

Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String

介绍背景:最近在使用mybatis-plus的时候出现了这个报错,然后配置啥mapperscan,在yml文件检查了一遍又一遍,痛哭流涕!在查阅3小时后得以解决,原来是mybatis-plus中集成的mybatis版本太旧方案一将springboot版本设置为旧版本,如3.1.5方案二单独引入依赖mybatis-spring,并且把版本设置为3.0.3!!!     3.0.2也不行

java - 如何修复 api 21 的 context.getSystemService(class)?

我正在关注JobScheduler的视频:https://www.youtube.com/watch?v=XFN3MrnNhZA但是lint告诉我context.getSystemService(class)是api23。那么我是不是遗漏了什么或者android是否用那里的api改变了什么?注意:主要想知道JobScheduler是否在api21中引入如果没有getSystemService(Class)它会如何工作谢谢。 最佳答案 感谢Reghunandan,我使用以下方法找到了更好的解决方案:github.com/firebas

android - 为什么我得到 "call to OpenGL ES API with no current context"?

我是openGL和android开发的新手,所以如果我的问题很琐碎,请原谅我。我正在尝试构建一个简单的小应用程序,该应用程序在三个EditText中接受用户的输入,这些EditText表示要在GLSurfaceView中显示的RGB颜色的每个组件的0-100%值。要注意的是,我需要它来使用openGLES2.0,并且我需要使用统一值将数据传递到着色程序,这样一旦我让它工作,我就可以继续我真正想要完成的事情。运行我编写的内容后,我可以让GLSurfaceView正确显示第一个纯色,但是每当我更改任何值并调用重建着色程序中的统一插槽时,我都会在LogCat中收到此错误:错误/libEGL(

TypeError: loop of ufunc does not support argument 0 of type float which has no callable radians met

目录遇到了下面的这个问题:TypeError:loopofufuncdoesnotsupportargument0oftypefloatwhichhasnocallableradiansmethod经查询了解到:查询得知问题是数据列不是数值类型,而np.log()函数需要输入数值数据。查看我的数据发现数据对象均为object,因此需要将数据框中的object数据转换为float类型,进行如下操作:df=pd.DataFrame(df,dtype=float)print(np.log(df))