草庐IT

android - 错误 : cannot find symbol method getMap() after dependencies update

更新我的依赖项后,我的getMap()将无法工作。(在更新之前它曾经工作得很好)这是我得到错误的代码行GoogleMapmap=((MapView)mRootView.findViewById(R.id.fragment_map_mapview)).getMap();LocationlocationNet=locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);LocationlocationGps=locationManager.getLastKnownLocation(LocationManage

android - Dagger 2 错误 : android. content.Context cannot be provided without an @Provides-annotated method

我正致力于在我的项目中实现Dagger2。为此,我编写了以下代码行:@InjectVideoControllerViewmediaController;@ModulepublicclassPlayerModule{@ProvidesVideoControllerViewprovidesVideoControllerView(Contextcontext,VideoControllerView.Controlerscntrls){returnnewVideoControllerView(context,cntrls);}}@Component(modules=PlayerModule.c

android - intellij 在 android xml 文件中说 "cannot find declaration to go to"

这个问题在这里已经有了答案:IntelliJcannotfindanydeclarations(35个答案)关闭2年前。当我在themes_holo.xml(Android系统文件)中找到声明时,Intellij告诉我:cannotfinddeclarationtogoto这里是提到的代码:@null@style/DialogWindowTitle.Holo.Light...@style/PreferencePanel.Dialog

android - 蓝牙网关 : negotiating new MTU succeeds but new size cannot be used (3 bytes difference)

我正在开发一款使用BLE在设备之间交换数据的应用程序。为了获得更好的性能,在连接两个设备后,我正在协商增加MTU,以便通过BLE交换更大的数据包。连接BluetoothDevice并读取所有服务和特征后,我请求使用以下方法增加MTU:privatevoidrequestMtu(){//gattisaBluetoothGattinstanceandMAX_MTUis512this.gatt.requestMtu(MAX_MTU);}之后,在BluetoothGattCallback实现中,我成功获得了MTU请求,并且新的MTU与我请求的匹配:@OverridepublicvoidonMt

android - Facebook ,安卓 java.lang.IllegalStateException : Cannot execute task: the task is already running

登录后我可以进行FB查询。几分钟后(玩游戏)Facebook请求失败异常:java.lang.IllegalStateException:Cannotexecutetask:thetaskisalreadyrunning调用失败Request.executeMeRequestAsync(Session.getActiveSession(),newRequest.GraphUserCallback(){...Request.executeGraphPathRequestAsync(Session.getActiveSession(),"me/apprequests",newRequest

android - 尝试在 builder.setPositiveButton 的 onClick() 方法中放置一些代码时获取 'Cannot resolve method ' addOnCompletionListener( )'.......'

我试图在AlertDialog.Builder中放置一些代码的builder.setPositiveButton方法。问题是我收到以下错误:Cannotresolvemethod'addOnCompletionListener(anonymousandroid.content.DialogInterface.OnClickListener,anonymouscom.google.android.gms.tasks.OnCompletionListener)代码如下:AlertDialog.Builderbuilder=newAlertDialog.Builder(SignUpActiv

android - setRequestProperty 抛出 java.lang.IllegalStateException : Cannot set request property after connection is made

我收到java.lang.IllegalStateException:java.lang.IllegalStateException:CannotsetrequestpropertyafterconnectionismadeerrorwhensetRequestProperty方法被调用后url.openConnection();这是我正在尝试的:URLurl=newURL("https://49.205.102.182:7070/obsplatform/api/v1/mediadevices/545b801ce37e69cc");urlConnection=(HttpsURLConn

android - Android 库中的 Firebase 依赖项 : Cannot invoke method get() on null object

我在将firebase依赖项添加到android库时遇到构建问题。我的设置如下/settings.gradleinclude':module-lib'include':module-app'/build.gradlebuildscript{dependencies{classpath'com.android.tools.build:gradle:3.1.2'classpath'com.google.gms:google-services:4.0.0'}}/module-lib/build.gradleapplyplugin:'com.android.library'android{..

android - CrashlyticsCore : Cannot invoke method: registerOnMeasurementEventListener

我已经安装了androidfirebase性能库,我可以在仪表板中看到应用程序速度等,但网络请求监控似乎不起作用。我在logcat中收到此错误:W/CrashlyticsCore:Cannotinvokemethod:registerOnMeasurementEventListenerjava.lang.reflect.InvocationTargetExceptionatjava.lang.reflect.Method.invoke(NativeMethod)atcom.crashlytics.android.core.DefaultAppMeasurementEventListen

android - 应用程序 :visibleGone cannot resolve on android Databinding

当我构建项目时。我在app:visibleGone上遇到错误我还在build.gradle中启用dataBinding并使用android架构组件和mvvm。项目targetSdkVersion为26,支持的lib版本为26.0.1。错误提示如下error:packagecom.****.****.databindingdoesnotexisterror:cannotfindsymbolclassActivityMainBindingCannotfindthesetterforattribute'app:visibleGone'withparametertypebooleanonand