草庐IT

scope-resolution

全部标签

java.lang.NoClassDefFoundError : Failed resolution of: Ljavax/naming/directory/InitialDirContext; 错误

我正在尝试使用androidstudio中的Smack库构建一个带有XMPP协议(protocol)的聊天应用程序。通过使用Smack版本3.1.0,我可以轻松连接到OpenFire服务器,甚至我向通过Spark登录的用户发送了一条消息。但我永远无法收到来自该用户的消息,因为MessageListener的processMessage在编译时只运行了一次。因为我无法获得最喜欢的结果,所以我在互联网上搜索并发现smack来自版本4.1或更高版本,仅支持android。所以我尝试使用smack4.1.4构建我的应用程序并解决了许多错误。但有一个错误没有解决,我无法在互联网上找到它。就是这样

android - Google People API 在 scopes.profile 中出现性别错误

首先,我实际上想从旧方法中获取性别,但它说已经弃用了,我在getGender()时出错;无法识别GoogleSignInAccountacct=result.getSignInAccount();IntentHome=newIntent(this,HomeActivity.class);Home.putExtra("name",acct.getDisplayName());Home.putExtra("email",acct.getEmail());Home.putExtra("URL",acct.getPhotoUrl());Home.putExtra("URL",acct.getG

android - 错误 : declaration conflicts with target of using declaration already in scope

我是android构建系统的新手,在MACOS中构建时出现以下错误。请帮助我成功构建。Infileincludedfromexternal/libcxx/src/any.cpp:10:Infileincludedfromexternal/libcxx/include/experimental/any:84:external/libcxx/include/cstdlib:167:44:error:declarationconflictswithtargetofusingdeclarationalreadyinscopeinline_LIBCPP_INLINE_VISIBILITYlong

android - java.lang.NoClassDefFoundError : Failed resolution of: Lcom/squareup/okhttp/OkHttpClient error when using Picasso offline capability - Android 错误

我正在开发一个项目,该项目使用Android中的Picasso库具有离线功能。到目前为止,我只是在学习教程。这是我的gradle:dependencies{compilefileTree(dir:'libs',include:['*.jar'])testCompile'junit:junit:4.12'compile'com.android.support:appcompat-v7:23.4.0'compile'com.android.support:recyclerview-v7:23.4.0'compile'com.android.support:cardview-v7:23.4.

java.lang.NoClassDefFoundError : Failed resolution of: Lcom/google/android/gms/common/GooglePlayServicesUtil 错误

我正在尝试运行GoogleCloudMessaging示例,它遵循官网的教程https://developer.android.com/google/gcm/client.html.但是,示例突然崩溃并生成如下错误:经过跟踪,我发现这段代码的错误是:/***CheckthedevicetomakesureithastheGooglePlayServicesAPK.If*itdoesn't,displayadialogthatallowsuserstodownloadtheAPKfrom*theGooglePlayStoreorenableitinthedevice'ssystemset

android - RESOLUTION_REQUIRED 即使用户的位置已打开。可能吗?

我在应用程序上使用Google的SettingsClient。它工作正常,但有些用户无法使用GPS,即使他们已打开位置并且已经授予访问位置权限。据我了解,如果SettingsClient在其FailureListener上返回RESOLUTION_REQUIRED,那是因为用户禁用了定位。这是真的吗?还是有任何其他原因返回RESOLUTION_REQUIRED?当返回RESOLUTION_REQUIRED时,GPS图标不会显示在状态栏上,但它应该在那里!这是我的代码:SettingsClientmSettingsClient=LocationServices.getSettingsCl

android - Dagger 2 : Scoping and handling release/cleanup of provided injection

是否可以限定此范围并在模块或其他地方提供释放方法以防止内存泄漏。前任。我需要在onDestroy()中关闭一个数据库连接,但如果这可以由模块本身处理就好了。考虑以下示例*代码。*阅读容易出错的代码,风险自负模块@dagger.Module@lombok.NoArgsConstructorpublicclassPersistenceModule{@Provides@SingletonDatabaseProviderprovidesDatabaseHelper(Contextcontext){returnnewDatabaseProvider(context);}}Activitypubl

android - Xamarin/安卓 : F# scoping - how do I see a namespace in a different file?

Xamarin/Android:F#作用域-如何在不同文件中查看命名空间?我知道这听起来很基础,但我似乎无法让它发挥作用。我将举例说明:我开始一个新的解决方案,我选择一个新的F#Android应用程序并将其命名为FSScopeTest1,给我MainActivity.fsnamespaceFSScopeTest1openSystemopenAndroid.ContentopenAndroid.OSopenAndroid.RuntimeopenAndroid.ViewsopenAdroid.Widget[]typeMainActivity()=inheritActivity()letmu

android - java.lang.NoClassDefFoundError : Failed resolution of: Lorg/jacoco/agent/rt/internal_773e439/Offline; 错误

我有一个android应用程序,它依赖于我自己构建的一些android库。如果我使用build.gradle中指定的库依赖项构建应用程序,则会出现以下异常。-6694/com.mycompany.myprojectD/AndroidRuntime:ShuttingdownVM05-1018:47:55.9866694-6694/com.mycompany.myprojectE/AndroidRuntime:FATALEXCEPTION:mainProcess:com.mycompany.myproject,PID:6694java.lang.NoClassDefFoundError:F

android - 尝试将 Firebase 与 AndroidX 一起使用会产生错误 : Failed resolution of: Landroid/support/v4/util/ArrayMap;

我试图在我的应用中使用AndroidX库,但我遇到了问题。我了解与Firebase相关的问题。如您所见,我排除了支持v4库,我这样做是有原因的。如果我删除这些行,将会出现另一个错误:“程序类型已存在:android.support.v4.media.MediaBrowserCompat$ConnectionCallback$StubApi21”。那么如何同时使用AndroidX和Firebase呢?有什么解决办法吗?E/AndroidRuntime:FATALEXCEPTION:mainProcess:com.ignes.androidxtest,PID:30800java.lang.