草庐IT

PRICEFORID_TYPE

全部标签

java - "Type of the parameter must be a class annotated with @Entity"在 Room 中创建 Generic DAO 接口(interface)时

我正在使用Room架构组件来实现持久性。我创建了通用的DAO接口(interface)以避免样板代码。RoomProTips但是我的代码没有编译说“错误:(21、19)错误:参数的类型必须是用@Entity注释的类或其集合/数组。”对于通用类T。interfaceBaseDao{@Insert(onConflict=OnConflictStrategy.REPLACE)voidinsert(T...entity);@Updatevoidupdate(Tentity);@Deletevoiddelete(Tentity);}@DaopublicabstractclassReasonDao

android - 错误 : AGPBI: Program type already present: com. google.android.gms.auth.api.signin.internal.zzg

在我使用Google登录和Firebase云消息传递的Adrdoi应用程序中,我收到此错误消息:AGPBI:{"kind":"error","text":"Programtypealreadypresent:com.google.android.gms.auth.api.signin.internal.zzg","sources":[{}]}这是否意味着google身份验证库已在其他地方使用?那是什么? 最佳答案 我遇到了同样的问题。因改变而改变implementation'com.google.firebase:firebase-

android - 错误 : The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'

升级flutterrun后,应用无法运行。我升级是因为ImageStreamListener我试图改变不同的channel[master,stable,dev]并且不起作用。我找到了thisFlutter中的问题,但没有帮助。这是我的flutter医生[✓]Flutter(Channelunknown,v1.7.11,onMacOSX10.14.518F132,localeen-PE)[✓]Androidtoolchain-developforAndroiddevices(AndroidSDKversion28.0.3)[✓]Xcode-developforiOSandmacOS(Xc

android - 错误 : The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'

升级flutterrun后,应用无法运行。我升级是因为ImageStreamListener我试图改变不同的channel[master,stable,dev]并且不起作用。我找到了thisFlutter中的问题,但没有帮助。这是我的flutter医生[✓]Flutter(Channelunknown,v1.7.11,onMacOSX10.14.518F132,localeen-PE)[✓]Androidtoolchain-developforAndroiddevices(AndroidSDKversion28.0.3)[✓]Xcode-developforiOSandmacOS(Xc

javascript - react-native android 中此问题 "Cannot convert argument of type class org.json.JSONArray"的原因是什么?

我正在尝试编写插件以在react-native中获取带有包名称和图标的应用程序列表。我以JSONArray的形式获取所有必需的数据,图像存储在sdcard中。我正在使用回调将结果(JSON数组)返回给javascript(成功或失败)。我收到上述错误。请找到获取详细信息的java代码,如下所示。打包com.sampleapp;importcom.facebook.react.ReactPackage;importcom.facebook.react.bridge.Callback;importcom.facebook.react.bridge.JavaScriptModule;impo

android - 错误 : "Cannot make a static reference to the non-static method findViewById(int) from the type Activity"

我是Java的新手,正在尝试使用EditText创建一个Activity。创建时,它加载当前日期,当用户选择EditText时,它显示一个DatePicker。用户选择日期后,我需要将结果放入EditText。但是,我目前收到以下错误:Cannotmakeastaticreferencetothenon-staticmethodfindViewById(int)fromthetypeActivity我知道我不能对非静态方法进行静态引用。我试图删除所有静态引用,但这给了我其他错误。我的代码如下。您能帮我提供一些示例代码,说明我如何才能完成这项工作吗?错误出在我尝试将结果放入EditTex

android - 需要根据 Sensor.TYPE_ORIENTATION 数据计算旋转矢量

我需要根据从Sensor.TYPE_ORIENTATION获得的数据计算旋转矢量。传感器数据定义如下:必须重新计算值才能成为正确的3d位置:值[0]:方位角,磁北方向与Y轴之间的角度,围绕Z轴(0到359)。0=北,90=东,180=南,270=西值1:俯仰,绕X轴旋转(-180到180),当z轴向y轴移动时为正值。values[2]:Roll,绕Y轴旋转(-90到90),当x轴远离z轴时取正值我需要所有三个值,例如Z轴值(从0到360度)。我尝试了很多但无法弄清楚如何做到这一点:/(编辑:要了解工作代码背后的想法,请查看DroidARframework的ActionWithSenso

Android WindowManager TYPE_SYSTEM_ALERT 触摸布局

我的应用程序在特定时间向用户显示一个按钮作为TYPE_SYSTEM_ALERT,我试图让用户move它。触摸和moveAction确实使用以下代码注册,但按钮不会move。我错过了什么?//createbuttonmbtRec=newButton(ACR.getContext());mbtRec.setText(R.string.start_recording);mbtRec.setTypeface(null,Typeface.BOLD);mbtRec.setBackgroundColor(Color.RED);//mbtRec.setBackgroundResource(R.draw

android - {"error": {"message" :"(#324) Requires upload file" ,"type" :"OAuthException" ,"code":324}}

privatevoidpostToWall(Stringmsg){Bundleparameters=newBundle();//parameters.putString("method","stream.publish");JSONObjectattachment=newJSONObject();try{byte[]data=null;Bitmapbi=BitmapFactory.decodeResource(getResources(),R.drawable.bluerib);//Bitmapbi=//BitmapFactory.decodeFile("http://demos.co

android - SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS 是什么意思?

我正在尝试使用onPreviewFrame()回调显示经过过滤的相机预览。问题是当我删除这一行时:mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);为了隐藏预览,应用程序崩溃了。日志内容如下:08-1915:57:51.042:错误/CameraService(59):registerBuffers失败,状态为-38这是什么意思?这在任何地方都有记录吗?我正在使用来自SDKAPIDemos的CameraPreview:http://developer.android.com/resources/samples/ApiDem