草庐IT

current_index

全部标签

android - WARN in logcat ResourceType : For resource . .., entry index(...) is beyond type entryCount(1)

每次应用程序呈现某些布局时,我都会在logcat上收到这些警告。试图搜索但找不到线索。我认为与资源(可绘制对象、字符串或值)有关,但我不知道是什么原因造成的。这不是错误,但有点烦人。有人有想法吗?04-2215:28:33.20421943-21943/xx.xxx.xxxxxxx.xxxxx.xxxxxW/ResourceType﹕Forresource0x01030128,entryindex(296)isbeyondtypeentryCount(1)04-2215:28:33.20421943-21943/xx.xxx.xxxxxxx.xxxxx.xxxxxW/ResourceT

android - 带有 Android : How do I inject the current context? 的 Dagger

当我使用RoboGuice时,我能够通过构造函数将上下文注入(inject)到我的类中,并且RoboGuice会选择合适的上下文(在Activity中注入(inject)将具有Activity上下文,在Application中注入(inject)将具有当前应用程序上下文,在fragment将具有fragment的Activity上下文等...)。Dagger有类似的方法吗?publicclassThing{@InjectpublicclassThing(Contextcontext){//ifi'minjectedinanActivity,Ishouldbethecurrentacti

android - 将 native : Change the Entry file path index. android.js react 到指定的自定义文件路径

我需要将Entry文件路径更改为src/XXXApp.android.js而不是指向默认的index.android.js文件。我想将JS文件保存在单独的./src文件夹中。所以我在./android/app/build.gradle中做了更改,比如project.ext.react=[bundleAssetName:"src/XXXApp.android.bundle",entryFile:file("../../src/XXXApp.android.js"),root:"../../../../",inputExcludes:["android/**","./**"]]并且在.\n

android - OPENGL ES 不工作 : no Current context

我尝试了OpenGLES2forAndroid书中所示的程序,但它不工作!!我已经在OdroidE、samsungs3、samsungy、samsungstar上测试过!!theglversionsuportedreturns2,butiget11-2215:09:45.804:E/oGl-esv(9047):2.0:13107211-2215:09:45.804:E/libEGL(9047):calltoOpenGLESAPIwithnocurrentcontext(loggedonceperthread)11-2215:09:45.804:E/unableto(9047):crea

android - "persistent state"与 "current state"

试图决定(针对我的应用程序)在onPause()中保存什么以及要保存在onSaveInstanceState()中的内容,我梳理了整个SO以获得提示和明确的指导方针。如果我没理解错的话,onSaveInstanceState()最适合保存“运行时更改”或“当前状态”(无论是什么意思),而onPause()最适合保存“持久状态”(无论这意味着什么)。我仍然难以决定在我的应用程序中什么构成“持久状态”与“当前状态”。例如,虽然用户偏好显然是持久性的,但当用户更改它们时它们总是由AndroidUI框架自动保存时,我是否需要将它们保存在onPause()中?类数据成员是否需要保存在onSave

android - Gradle 错误 : String index out of range: 0

尝试使用Gradle编译Android项目并出现奇怪的错误。当我运行./gradlewtasks--stacktrace时。尝试过干净的重建,repo的新克隆,不同的分支,同事能够构建aok。寻找事物的想法来检查/尝试解决这个问题。*更新:恢复到Gradle2.11和com.android.tools.build:gradle:2.2.0-alpha6似乎已经解决了这个问题。*这是堆栈:FAILURE:Buildfailedwithanexception.*Whatwentwrong:Stringindexoutofrange:0*Try:Runwith--infoor--debugo

android - 滚动列表时 RecyclerView.getChild(index) 显示 null(索引变得困惑)

我一直在为我的android应用程序使用SwipeableRecyclerView来为我的recyclerView启用滑动。RecyclerView包含一个cardView列表。我正在尝试为向左滑动时将被删除的卡片实现撤消功能(第一次滑动显示撤消,下一次滑动触发删除)我正在尝试以下代码(我猜是部分工作)SwipeableRecyclerViewTouchListenersrvTouchListner=newSwipeableRecyclerViewTouchListener(rvTimerList,newSwipeableRecyclerViewTouchListener.SwipeL

android - java.lang.IllegalStateException : Failure saving state: active has cleared index in fragment 错误

首先,我的应用具有如下结构:SpashActivity->MainActivity->switchingbetweenmanyfragments我的应用程序使用SlideMenu在fragment之间切换。我必须使用attach而不是replace来保持fragment状态。它看起来像:publicvoidswitchContent(intindex,StringfragmentTag){FragmentManagerfragmentManager=getSupportFragmentManager();FragmentTransactiontransaction=fragmentMa

c++ - Visual Studio 的 "preprocess current file"插件? (C++)

我知道VisualStudio有“/P”选项来生成预处理文件,但它非常不方便。I'mlookingforanaddinthatallowsyoutoright-clickonafileandselect"viewpreprocessed"-oranysimilarsolutionthatwouldbasicallypreprocessthecurrently-openfile(withtheappropriateoptionsfromthecurrentconfiguration)andshowme输出,没有额外的麻烦。有这种东西吗? 最佳答案

c++ - 如何使用 gdb 查看 boost::multi_index 哈希索引的数据

我想使用gdb查看boost::multi_index(版本1.67.0)包含的数据。首先我尝试了https://github.com/ruediger/Boost-Pretty-Printer.似乎不支持散列索引,例如hashed_unique。我注意到如果第一个索引是受支持的类型,例如sequenced,Boost-Pretty-Printer可以正常工作。但是,我现在无法编辑代码。我需要调试核心文件和二进制可执行文件。我试图通过散列索引来理解multi_index的内部结构。我写了下面的测试代码:#include#include#includenamespacemi=boost: