草庐IT

resource-cleanup

全部标签

android - 错误 : Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.ActionButton'

我正在关注文档here将AndroidSupportV7Libary安装到我的项目中。我注意到两件事:1)当我浏览我的SDK安装目录和SupportLibrary文件夹时,没有名为“appcompat”的文件夹2)当我安装整个V7文件夹时,我得到这个错误:error:Errorretrievingparentforitem:Noresourcefoundthatmatchesthegivenname'Widget.AppCompat.ActionButton'我该如何解决这个问题?(注意:这是在mediarouter文件夹中)这是我在浏览我的SDK安装目录时看到的:http://tin

android - 添加 Google Analytics 时如何修复错误 : Duplicate resources for global_tracker. xml?

我正在尝试在我的App中实现GoogleAnalytics,但在编译时出现以下错误:Error:Executionfailedfortask':app:mergeDebugResources'.[xml/global_tracker]C:\Users\Carlos\AndroidStudioProjects\Capstone\SP\StocksPanelLite\app\src\main\res\xml\global_tracker.xml[xml/global_tracker]C:\Users\Carlos\AndroidStudioProjects\Capstone\SP\Stoc

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 - 未找到输出 : error: resource style/TextAppearance. Compat.Notification.Info(又名 package_name :style/TextAppearance. Compat.Notification.Info)

切换到AndroidStudio3.2canary后,我收到以下构建错误。我看过this发布这个人有类似问题但没有提到解决方案的地方。我想尝试新的Material组件和喷气背包,所以有没有可能我不必切换回去。com.android.builder.internal.aapt.v2.Aapt2Exception:AndroidresourcelinkingfailedOutput:error:resourcestyle/TextAppearance.Compat.Notification.Info(akacom.nsnik.nrs.kotlintest.debug:style/TextA

ic_sync_black_24dp.xml 的 android.content.res.Resources$NotFoundException

我已经为此苦苦挣扎了一个多星期,因为我认为它必须与我的环境有关,但我无法缩小范围。我开始一个空项目,添加一个“空白”Activity并接受所有默认设置。项目设置完成后,我添加一个“设置”Activity。在MainActivity.java中,我添加了两行代码来连接两个Activity,然后构建项目。publicbooleanonOptionsItemSelected(MenuItemitem){//Handleactionbaritemclickshere.Theactionbarwill//automaticallyhandleclicksontheHome/Upbutton,so

以编程方式设置 android.R.attr.listChoiceIndicatorMultiple 时的 android.content.res.Resources$NotFoundException

我正在尝试以编程方式为ListView中的CheckedTextView项目设置“android:checkMark”属性。运行我的应用程序时出现以下异常:android.content.res.Resources$NotFoundException:ResourceID#0x101021aID#0x101021a的资源对应于android.R.attr.listChoiceIndicatorMultiple,这正是我传递给我的CheckedTextView的值:mCheckedTextView.setCheckMarkDrawable(android.R.attr.listChoic

android - 错误 android.content.res.Resources$NotFoundException : File from xml type layout resource ID #0x102000a

嘿,我正在尝试为一个看起来像(并且大部分行为像)通话记录的列表设计,如下所示:为此,我下载了源代码,并且正在研究它以了解实现它的类和xml文件。我找到了这两个xml文件recent_calls_list_item.xml:另一个是recent_calls_list_item_layout.xml:我的Activity是这样的:publicclassRatedCallsextendsListActivity{privatestaticfinalStringLOG_TAG="RecentCallsList";privateTableLayouttable;privateCallDataHe

android - 在 Android Studio 中构建项目时出错 "Error: No resource found that matches the given name (at ____ with value ' @drawable/<name>')

我在Google、stackoverflow和其他android编程网站上进行了搜索,许多网站都为那些将文件从一个文件夹错放到另一个文件夹的人提供了建议等等。但没有一个能说明我面临的问题。这不是像here中那样的损坏文件因为我尝试过但没有成功。我面临的错误是类似的:[debug]C:\Users\Name\AppData\Local\Temp\android_manifest_copy6264790980678653632tmp\AndroidManifest.xml:11:error:Error:Noresourcefoundthatmatchesthegivenname(at'ic

android - 如何将 Android.Resource.Color 转换为 Android.Graphics.Color

我有一个Android.Resource.Color的值,比如Android.Resource.Color.HoloOrangeDark。我想将其转换为Android.Graphics.Color。我该怎么做? 最佳答案 Resources.GetColor已弃用。确保使用ContextCompat.GetColor代替。所以Resources.GetColor(Resource.Color.HoloOrangeDark);将成为intcolorInt=ContextCompat.GetColor(this.Context,Reso

android - 找不到错误 :resource style/TextAppearance. Compat.Notification.Info(又名 {packageId}.test :style/TextAppearance. Compat.Notification.Info)

我刚刚将build.gradle编译SDK更新为27API。compileSdkVersion27buildToolsVersion'27.0.3'targetSdkVersion27但是一旦我点击同步按钮它就​​会抛出error:resourcestyle/TextAppearance.Compat.Notification.Info(aka{packageId}.test:style/TextAppearance.Compat.Notification.Info)notfound.error:resourcestyle/TextAppearance.Compat.Notificat