草庐IT

first-class-functions

全部标签

android - 如何解决多个 D8 警告 : <Class X> was not found, 它是 default 或静态接口(interface)方法 desugaring <Class Y> 所必需的?

将AndroidGradle插件从3.1.4升级到3.2.x后,我收到多个警告,例如:D8:Type`com.google.gson.reflect.TypeToken`wasnotfound,itisrequiredfordefaultorstaticinterfacemethodsdesugaringof`com.google.gson.reflect.TypeTokenorg.springframework.http.converter.json.GsonHttpMessageConverter.getTypeToken(java.lang.reflect.Type)`D8:Ty

android - 运行 sdkmanager --licences 时出现 "Could not find or load main class java.se.ee"

在androidstudio上构建我的项目时,它要求我接受许可协议(protocol)并使用AndroidStudioSDK管理器完成缺少组件的安装。当我运行“./sdkmanager--licenses”时,出现“无法找到或加载主类java.se.ee”错误。我在stackoverflow上发现了很多类似的问题,但提供的解决方案都不适合我。我已经尝试过:1-降级到java82-exportJAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions--add-modulesjava.se.ee'3-通过添加更改sdkmanager文件:DEFAULT_JVM

android - FCM 返回错误 : NotRegistered after the first message

我按照firebase.google.com上的说明在我的项目中添加了FCM。一切正常,我的日志中收到消息“FirebaseApp初始化成功”和新token。但它不起作用......只有我发送到token的第一个推送通知我才能成功。第二次推和休息得到错误“NotRegistered”。文档说IfitisNotRegistered,youshouldremovetheregistrationIDfromyourserverdatabasebecausetheapplicationwasuninstalledfromthedevice,ortheclientappisn'tconfigur

android - 无法使用 Facebook 帐户工具包 : Error inflating class com. facebook.accountkit.ui.ConstrainedLinearLayout

我正在尝试集成FacebookAccountKit以允许用户使用他们的电子邮件或电话号码进行注册。但是当启动AccountKitActivity时,应用程序崩溃,因为它无法膨胀“ConstrainedLayout”。错误信息:java.lang.RuntimeException:Unabletostartactivityandroid.view.InflateException:BinaryXMLfileline#45:Errorinflatingclasscom.facebook.accountkit.ui.ConstrainedLinearLayout及以下:Causedby:ja

android - IntelliJ 12 + ActionBarSherlock 设置 : Could not find class 'android.support.v4.app.FragmentActivity'

有很多关于IntelliJ12+ABS(ActionBarSherlock)设置的问答。与thisquestion类似的情况但显示不同的错误。整体编译和运行正常,但只有ActivityusingTabNavigation(SherlockActivityimplementsActionBar.TabListener)出现以下错误和崩溃。请注意,我可以使用一般的SherlockActivity显示良好。“找不到类‘android.support.v4.app.FragmentActivity’,从方法com.actionbarsherlock.internal.app.ActionBar

android - 谷歌地图在 Android 上运行良好,但我仍然收到错误 "Could not find class ' maps.i.k',引用自方法 maps.z.ag.a"

通过下载库,将其添加到工作区,然后将其作为库引用,我让GoogleMapsAndroidAPIv2在我的Android应用程序上完美运行。但是一旦包含mapfragment的Activity开始,我仍然会收到此错误Couldnotfindclass'maps.i.k',referencedfrommethodmaps.z.ag.a顺便说一句,我正在使用支持mapfragment这个错误似乎并没有影响到我,也没有使应用程序崩溃,我应该修复它吗?添加listP.SE_SelectJourney是我显示和使用map的地方添加了logcat03-2616:57:14.897:W/dalvikv

Android - 使用手机所有者的 AccountManager/First and Last name 获取 UserData

我想在我的应用程序中预填充一些字段,以便在用户订阅我的应用程序内的服务时帮助他。那么我如何获得设备所有者的名字和姓氏。我想使用与Google帐户关联的默认信息;到目前为止我得到了这个:AccountManageram=AccountManager.get(this);Account[]accounts=am.getAccounts();for(Accountaccount:accounts){if(account.type.compareTo("com.google")==0){StringpossibleEmail=account.name;//howtogetfirstnamean

c++ - 错误的 "control reaches end of non-void function"gcc 警告怎么办?

$catt.cppintsign(inti){if(i>0)return1;if(i==0)return0;if(i我该怎么办?停止使用-Wall,因为它显然是错误的?最后加个假的return0?用“else”子句使代码困惑? 最佳答案 如果您不想添加“else”子句,因为它们会使代码变长,那么您可能想删除最后的“if”并使代码更短:intsign(inti){if(i>0)return1;if(i==0)return0;return-1;//i或者,如果您真的是在自己计算“符号”,而这并不是某个较长示例的简化:intsign(in

c++ - 错误 : no matching function for call to ‘std::vector<std::__cxx11::basic_string<char>>::push_back(int&)’

我是C++的新手。当我运行我的代码时出现此错误:(BigSorting.cpp:Infunction‘intmain(int,constchar**)’:BigSorting.cpp:13:22:error:nomatchingfunctionforcallto‘std::vector>::push_back(int&)’v.push_back(m);^Infileincludedfrom/usr/include/c++/8.1.1/vector:64,fromBigSorting.cpp:2:/usr/include/c++/8.1.1/bits/stl_vector.h:1074:

c++ - 为什么在 VC++ 调试器上计算表达式时会出现 "member function not present"错误?

我在另一个DLLMyDll.dll上有一个静态方法MyClass::myMethod()。在我的代码中,我调用了这个方法,它编译并运行良好。但是当我在即时窗口(或监window口)中尝试MyClass::myMethod()时,我总是得到:MyClass::myMethod()CXX0052:Error:memberfunctionnotpresent这是为什么?更新:我发现当我使用contextoperator它有效:{,,MyDLL}MyClass::myMethod()不过,我不太确定为什么需要它,所以我要稍等片刻,看看是否有人有很好的解释。更新2:我被要求提供更多信息。不幸的是