草庐IT

reference-parameters

全部标签

android - 对 __android_log_print 的 undefined reference

此问题存在,但无法解决我的问题。我得到了对__android_log_print的undefinedreference,但我有包含header#include我的Android.mk文件有LOCAL_LDLIBS+=-L$(SYSROOT)/usr/lib-llogLOCAL_LDLIBS:=-landroid我也试过仅使用-llog,但无济于事。 最佳答案 在您的代码中,第二行覆盖第一行。如果你真的需要-android,使用LOCAL_LDLIB+=-landroid最有可能的是,-L$(SYSROOT)/usr/lib部分应该被

java - 异常 : Attempt to invoke virtual method 'int com.google.android.gms.location.LocationRequest.b()' on a null object reference

我已经阅读了一些相关主题,但未能解决我的问题。由于我处于学习阶段,我正在尝试实现谷歌的定位服务教程。问题是,我没有在代码中的任何地方使用“LocationRequest.b()”,但是当我按下“开始更新”按钮时出现以下错误。该应用程序随后崩溃。请让我知道我做错了什么。错误:Exception:Attempttoinvokevirtualmethod'intcom.google.android.gms.location.LocationRequest.b()'onanullobjectreference具体报错代码位置:protectedvoidstartLocationUpdates(

android - Android 上的 Facebook 分享视频异常 "ShareVideo must reference a video that is on the device"

我正在通过Gradle使用FacebookAndroidsdk4.6.0。根据SharingonFacebookguidenline配置facebook后,我正在尝试从移动目录上传视频,但我在调用sharedialog.show后遇到异常“ShareVideo必须引用设备上的视频”。异常是通过`onError(FacebookException异常)的回调向我报告的。/**firstcheckingiffileexistthanexecutecode,fileexitsandcodeexecutebutafterexecutingcallbackwithexception"ShareV

android - 初始化 SharedPreferences 给出 : Attempt to invoke virtual method on a null object reference

当我启动我的应用程序时,它崩溃了,并给我这个错误代码。Attempttoinvokevirtualmethod'android.content.SharedPreferencesandroid.content.Context.getSharedPreferences(java.lang.String,int)'onanullobjectreference这是我的主要Activity:packagecom.awplicity.testappshared;importandroid.content.Context;importandroid.content.Intent;importand

android - 错误 : <item> inner element must either be a resource reference or empty?

最近我将我的项目升级到AndroidStudio3.2.1、Gradel4.6、GradlePlugin4.6和tagetSDKVersion28。但是我在合并的values.xml文件中遇到以下错误-error:innerelementmusteitherbearesourcereferenceorempty.导致问题的合并values.xml中的行-falsefalsefalsefalsefalsefalsefalsefalsefalse准确的错误日志AndroidresourcecompilationfailedOutput:C:\AmrutData\Workspace\Q4\M

java - Camera.Parameters 设备特定崩溃(Samsung S3 Mini)

以下代码适用于GalaxyNexus、SamsungS3和HTCOneX,但在SamsungS3Mini上会崩溃@OverridepublicvoidsurfaceChanged(SurfaceHolderholder,intformat,intwidth,intheight){Log.d(TAG,"enteringsurfaceChanged");Camera.Parametersparameters=camera.getParameters();ListpreviewSizes=parameters.getSupportedPreviewSizes();//setbarcodesc

android - 显示错误 :Attempt to invoke interface method 'int java.util.List.size()' on a null object reference

我正在创建一个在ListView中显示联系人列表的应用程序。问题是我在运行我的应用程序时遇到以下错误并且我正在努力修复它:04-0513:41:48.8682488-2488/?E/AndroidRuntime:FATALEXCEPTION:mainProcess:com.kksworld.jsonparsing,PID:2488java.lang.NullPointerException:Attempttoinvokeinterfacemethod'intjava.util.List.size()'onanullobjectreferenceatandroid.widget.Arra

android - java.exe 已退出,代码为 2 (MSB6006) 无法写入输出 : Too many field references: 81626; max is 65536

我正在开发xamarinandroid应用程序,并在其中使用了许多包和引用(Googleplay服务)。当我尝试构建此项目时出现此错误:java.exeexitedwithcode2Troublewritingoutput:Toomanyfieldreferences:81626;maxis65536.Youmaytryusing--multi-dexoption. 最佳答案 您需要启用Mutlidex在你的项目中。Xamarin.Android自version5.1起支持此功能:Multi-dexsupportcanbeenabl

android - eclipse 中 undefined reference glBindVertexArrayOES

所有GLES2我都使用编译但这些错误不会消失undefinedreferencetoglBindVertexArrayOESundefinedreferencetoglBindVertexArrayOESundefinedreferencetoglGenVertexArraysOESundefinedreferencetoglBindVertexArrayOESundefinedreferencetoglBindVertexArrayOES似乎eclipse无法找到这些函数的定义位置,我不明白,因为所有其他函数都已完美找到,我是否需要声明任何内容才能使这些函数正常工作?谢谢

android - 对 'posix_fadvise' 的 undefined reference

我使用的是AndroidNDK版本:r9c我需要posix_fadvise()来建议操作系统不要缓存文件,我打开它是为了绕过缓存并在需要读/写时强制对存储设备进行I/O访问这个文件。我没有打开带有O_DIRECT标志的文件的原因是O_DIRECT在不同设备上存在兼容问题。我曾尝试直接调用__NR_arm_fadvise64_64但没有用,而且__NR_fadvise未在NDKr9c中定义。下面是示例代码,系统调用read不会触发I/O访问,这意味着页面缓存仍然有这个文件的记录。ret=fdatasync(fd);ret=syscall(__NR_arm_fadvise64_64,fd,