草庐IT

other-class

全部标签

android - Android Studio 无法识别 "RobolectricTestRunner.class"

我正在尝试使用Robolectric运行单元测试,但AndroidStudio无法识别以下类:@RunWith(RobolectricTestRunner.class)详细信息:classpath'com.android.tools.build:gradle:3.0.0'我正在导入依赖项:testImplementation"org.robolectric:robolectric:3.5.1"和:android{testOptions{unitTests{includeAndroidResources=true}}}它根本没有出现导入类的选项。我是否应该添加我忘记的更多依赖项?错误:e

Android.Views.InflateException : Binary XML file line #17: Error inflating class android. 支持.design.internal.NavigationMenuItemView

我在使用Xamarin的Android项目中使用Material抽屉导航。我一直在尝试将两个Framelayout添加到drawerlayout中,以便我可以切换不同fragment的内容,请参见下面的xml:主要Activity:protectedoverridevoidOnCreate(Android_OS.Bundlebundle){base.OnCreate(bundle);SetContentView(Resource.Layout.activity_main);drawerLayout=FindViewById(Resource.Id.drawer_layout);//Se

Android map 错误 "Could not find class ' android.app.AppOpsManager'”

我正在用map做一个简单的应用程序,一开始它运行良好,但突然间map不再显示,这些错误显示在logcat中:06-0620:53:37.00731809-31809/com.example.veuge.mapsE/dalvikvm﹕Couldnotfindclass'android.app.AppOpsManager',referencedfrommethodcom.google.android.gms.common.GooglePlayServicesUtil.zza06-0620:53:38.84931809-31809/com.example.veuge.mapsE/dalvik

android - 在 genymotion/Any other good android emulator 中启用 MIC

我正在制作一个使用麦克风录制音频的应用。如何在genymotion模拟器中启用麦克风?或有没有其他好的androidappdev模拟器?需要帮助谢谢! 最佳答案 Genymotion实际上可以使用您计算机的麦克风。由于VirtualBox硬件支持,它有时无法工作,具体取决于您的计算机。这是关于这个话题的对话Genymotion'sGoogleGroup.您应该尝试在VirtualBox上使用声音配置:打开VirtualBox选择一个虚拟机并打开它的设置转到声音选项卡并更改音频Controller或音频导频请告诉我您的配置(操作系统、

android - 管理当前的 View 和 Class<?> 对象

我有一个应用程序范围的实用程序类AppUtils,我可以在其中随时发布应用程序相关信息:作为SnackBar,当我在应用程序中时或通过通知管理器例如,当消息作为Snackbar运行时,我需要当前显示的View容器的轨道,以便在Snackbar.make(view,text,length);中使用它当我想通过NotificationManager.notify(int,Builder);发布该消息时,我需要here中的类签名IntentresultIntent=newIntent(this,ResultActivity.class);因此我的AppUtils中有:publicstatic

Android Eclipse 问题 Failed to create BuildConfig class

在eclipse中清理android项目时出现“无法创建BuildConfig类”错误。我最近为移动开发人员安装了EclipseJuno,当我尝试导入我现有的android应用程序时,Eclipse开始给我这种错误。如果我创建新的android项目,Eclipse工作正常。此问题的可能原因和可能的解决方案是什么?我正在使用操作系统-WindowsServer2008 最佳答案 我在更新(安装)Juno并让它迁移我的工作区和本地git存储库后出现错误。在那个错误之前,我得到了另一个错误:JavaBuilderhandlingImage

android - com.firebase.client.FirebaseException : Failed to parse node with class class CLASS_NAME android

我在使用updateChildren方法更新Firebase中的现有值时出现以下异常。com.firebase.client.FirebaseException:Failedtoparsenodewithclassclasscom.shajeelafzal.quicktasks_app.models.HashTagModelatcom.firebase.client.snapshot.NodeUtilities.NodeFromJSON(NodeUtilities.java:84)atcom.firebase.client.snapshot.NodeUtilities.NodeFrom

android - FindBugs Android Gradle No classes configured 错误

我正在尝试在Android构建中使用适用于Gradle的FindBugs插件。build.gradle文件buildscript{repositories{mavenCentral()}dependencies{classpath'com.android.tools.build:gradle:0.6.+'}}applyplugin:'android'applyplugin:'findbugs'android{compileSdkVersion19buildToolsVersion"19.0.0"defaultConfig{minSdkVersion8targetSdkVersion19

Android 5.0 Lollipop : setColorFilter "leaks" onto other buttons

我正在使用setColorFilter来设置我的其中一个按钮的颜色过滤器。在Android5.0Lollipop更新之前,这一直运行良好。现在,即使我关闭Activity并重新打开,滤色器似乎也会泄漏到我的其他按钮上(如果我关闭应用程序并重新打开,它会重置)。我的styles.xml(v21):(与旧版本相同,只是它的父级是Material,之前是Holo)@style/StandardButtontrue我的styles.xml(适用于所有版本):@android:drawable/btn_default我的按钮:我的代码:ButtonmainMenuButton=(Button)f

android - 类未找到异常 : Didn't find class "android.support.constraint.ConstraintLayout" on path

我正在使用一些库,所以我不得不编辑Gradle设置。由于我的应用程序无法运行,我在AndroidStudio中使用本地历史记录恢复了它,但它仍然无法运行。返回的错误报告在这里05-0423:26:34.95328017-28017/?I/art:Late-enabling-Xcheck:jni05-0423:26:35.21728017-28017/com.quintabi.facchini.myshopW/System:ClassLoaderreferencedunknownpath:/data/app/com.quintabi.facchini.myshop-2/lib/arm05