草庐IT

inside-out

全部标签

android - Gradle 依赖 : How to figure out what's causing this duplication

我有一个Android项目,其中包含一个MultiDex应用程序。我正在尝试使用./gradlewcleanconnectedAndroidTest运行Espresso测试。此命令最终导致此错误消息::app:dexDebugAndroidTestUNEXPECTEDTOP-LEVELEXCEPTION:java.lang.IllegalArgumentException:alreadyadded:Landroid/support/test/InstrumentationRegistry;我的顶级build.gradle包含:classpath'com.android.tools.bu

android - 'sh : 1: file: not found' when creating a android emulator inside a docker container

我正在尝试在docker容器中创建一个android模拟器,但遇到了一些问题。SDK更新和AVD创建成功,我尝试创建模拟器,出现以下错误:./emulator-avdtest-22-no-skin-no-audio-no-windowsh:1:file:notfoundsh:1:file:notfoundWARNING:Cannotdecidehostbitnessbecause$SHELLisnotproperlydefined;32bitsassumed.ERROR:32-bitLinuxAndroidemulatorbinariesareDEPRECATED,tousethem注

android - git - 使用 Gradle 构建将远程 git 代码 check out 到 Android Studio 导入的项目中

我有一些代码已导入到AndroidStudio中。它现在有一个Gradle构建(以前没有)。我现在需要执行gitpull。但是,鉴于目录结构略有变化,我不确定如何继续进行。app/src/main下的AndroidStudio目录结构与原来的类似,例如:安卓工作室[main]$lsAndroidManifest.xmlassetsjavares[main]$lsjava/LICENSE.txtREADME.mdcom原创$lsAndroidManifest.xmlREADME.mdresLICENSE.txtassetssrc$lssrc/com在com下它非常相似,除了反向域路径略有

android - ItemTouchHelper : Prevent out of bounds dragging

我有一个带有ItemTouchHelper的回收站View。它允许拖动项目。我想将拖动限制在回收器View的范围内-也就是说,您不能只将View拖到容器外,这样它就会消失。我试过像这样检查绝对坐标:@OverridepublicvoidonChildDraw(Canvasc,RecyclerViewrecyclerView,RecyclerView.ViewHolderviewHolder,floatdX,floatdY,intactionState,booleanisCurrentlyActive){recyclerView.getLocationOnScreen(pos);intr

安卓 : Access Mapview Inside Fragment With ViewPager

我正在使用ViewPager显示三个View。"Filter","Streets","Around"每个View都由fragment定义。我想要什么:我想在我的FilterFragment中使用Mapview。我做了什么:我想在过滤器fragment中使用MapView但无法成功运行。并获取日志类别错误:android.view.InflateException:二进制XML文件第33行:错误膨胀类com.google.android.maps.MapView我还在Net和Stackoverflow上搜索了这个问题并找到了LINK和LINK但无法找到与我的问题相关的链接,因为我正在使用

android - Google+ 登录 : Google Play Services out of date exception

我正在尝试将GooglePlus登录集成到我的Android应用程序中。当我尝试在AndroidGoogleAPI模拟器上运行此应用程序时,出现一个对话框提示我更新“GooglePlay服务”。单击“更新”按钮时没有任何反应,我可以在logcat中看到以下错误:Can'tredirecttoappsettingsforGooglePlayservices我还在logcat中收到以下警告:GooglePlayservicesoutofdate.Requires3225100butfound3158130另外我想补充一点,我已将GooglePlay服务从修订版8更新到修订版10。谁能告诉我

安卓; "Key dispatching timed out ..."

我有一个菜单Activity和一个从菜单启动的游戏Activity。某些(大多数)时间我会启动游戏Activity;所有输入都挂起几秒(最多10秒)然后以超高速播放,而我在logcat中得到这个:11-2018:24:27.873:WARN/WindowManager(2473):Keydispatchingtimedoutsendingtosouthgrove.game/southgrove.game.Game11-2018:24:27.873:WARN/WindowManager(2473):Previousdispatchstate:{{KeyEvent{action=1code

android - Facebook 登录按钮在显示新 View 之前更改其在 'log out' 中的文本

我使用FacebookSDK4.0为我的应用程序实现了通过Facebook登录。当用户点击facebook登录按钮时,他导航到主页Activity并加载新View。问题是,有一段时间,在facebook进程对话框消失后,在显示主视图之前,facebook登录按钮将其文本更改为“注销”,这对用户是可见的。我怎样才能避免这种情况?这是我在fragment登录中的代码:@OverridepublicViewonCreateView(LayoutInflaterinflater,ViewGroupcontainer,BundlesavedInstanceState){Viewview=infl

android - 为什么打开 proguard 的 "Surface frame wait timed out"编码?

我从ExtractDecodeEditEncodeMuxTest.java复制了代码进入我的应用程序以转码视频,最重要的变化是将类重命名为VideoTranscoder并删除extendsAndroidTestCase因为我要运行它脱离任何Activity.一切正常,直到我使用proguard编译发布版本,然后它在运行时失败:E/d:com.testapp.a.g.a.b.b(OutputSurface.java:270)E/d:com.testapp.a.g.a.d.a(VideoTranscoder.java:944)E/d:com.testapp.a.g.a.d.a(VideoT

android - 错误 :Execution failed for task ':app:processDebugResources' when using font folder inside res

我已将SDK更新到AndroidO开发者预览版,并开始使用单个TextView进行简单演示。当我在res文件夹中包含font时,它开始显示Error:Executionfailedfortask':app:processDebugResources'.>com.android.ide.common.process.ProcessException:Failedtoexecuteaapt这是我的build.gradleandroid{compileSdkVersion25buildToolsVersion"25.0.2"defaultConfig{...minSdkVersion15ta