草庐IT

dependent-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-

java - unity : Resolving Android Dependencies freeze. 无法导入任何插件

我有一个大问题。出于某种原因,我几乎无法将任何插件导入到我的Unity项目中。每当导入完成时,我都会看到ResolvingAndroidDependencies屏幕,但实际上并没有解决问题。我最近在导入UnityMediation插件时遇到了这个问题,现在我重新安装了我的AndroidStudio、Java和Unity,这导致了同样的错误,但现在即使是以前工作的插件也是如此。我不知道该怎么做。重新安装后,我不得不将我的SDK工具降级到25.0.5,否则由于Unity编辑器中的JAVA_HOME错误而无法构建项目。其他一切都是最新的。感谢任何帮助。 最佳答案

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 - "Error: String types not allowed (at ' configChanges ' with value ' 键盘|键盘隐藏| orien"... 在 AndroidManifest.xml 中

毕竟,我是Android的菜鸟,我正在使用API​​10(Gingerbread)。我正在使用libgdx开发一个简单的游戏。但我只是安装了一切以开始工作......在AndroidManifest.xml这一行:android:configChanges="keyboard|keyboardHidden|orientation|screenSize"在控制台中得到下一个错误:_error:Error:Stringtypesnotallowed(at'configChanges'withvalue'keyboard|keyboardHidden|orientation|screenSi

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