草庐IT

DEPRECATED_ATTRIBUTE

全部标签

java - 二进制 XML 文件行 #7 : You must supply a layout_width attribute

每当这段代码被执行时:inflater.inflate(R.layout.settings_switch,this);我收到这个错误:10-2913:27:00.090:E/AndroidRuntime(22364):Causedby:java.lang.RuntimeException:BinaryXMLfileline#7:您必须提供layout_width属性。怎么可能呢?我有android:layout_width="match_parent"android:layout_height="match_parent" 最佳答案

Android Studio 64 位错误 : 32-bit Linux Android emulator binaries are DEPRECATED

我最近将我的ubuntu13.1064位升级到14.0464位。AndroidStudio在13.10上始终运行良好。在14.04上,我遇到了gradle(thisone)问题,这是缺少libz.so.1的问题。正在关注thislink,我必须安装这个包的32位版本,它解决了我的问题。现在(我认为这是相关的),在尝试启动设备模拟器时,我收到这条消息:ERROR:32-bitLinuxAndroidemulatorbinariesareDEPRECATED,tousethemyouwillhavetodoatleastoneofthefollowing:-Usethe'-force-32

java - 错误 : no resource identifier for attribute 'srcCompat'

我在@drawable文件夹中使用复制+粘贴添加了2张图像,但出现错误Error:(25)Noresourceidentifierfoundforattribute'srcCompat'inpackage'com.example.francydarkcool.maps'我添加了:defaultConfig{vectorDrawables.useSupportLibrary=true;...}在build.gradle中还有:ImageViewimg1=newImageView(this);img1.setImageResource(R.drawable.cascada3);setCon

android - android :enabled attribute的双向数据绑定(bind)

我正在尝试找出Android中的双向数据绑定(bind)库。我想通过更改xml中的android:enabled属性来启用/禁用LinearLayout(以及内部的RelativeLayout)。XML部分如下所示:viewModel.doSomething()}"android:background="@drawable/shortcut_button_label_selector"android:orientation="horizontal">现在,我想这样做的原因是因为这两个选择器(shortcut_button_label_selector和shortcut_button_i

android - 谷歌地图与集群管理器 : onCameraChangeListener deprecated

我有一个带有大约500-1000个标记的Android应用程序。我正在使用android-maps-utils中的ClusterManager如图here对这些标记进行聚类。在最新的PlayServices更新中,Google更改了Googlemap的监听器模型。OnCameraChangeListener现在被标记为已弃用。相反,有四个新的监听器(OnCameraIdleListener、OnCameraMoveListener、OnCameraMoveStartedListener、OnCameraMoveCanceledListener)。自那次更新以来,我的应用程序非常慢。它卡

android - setTextAppearance deprecated android怎么用?

layout=(RelativeLayout)findViewById(R.id.relate);TextViewtv=newTextView(DetailActivity.this);layout.addView(tv);tv.setTextAppearance(DetailActivity.this,android.R.style.TextAppearance_Medium);tv.setGravity(Gravity.CENTER_HORIZONTAL);tv.setText("HelloMan");这是我的代码,如何为API>23使用setTextAppearance感谢帮助

android getSharedPreferences 错误 : Map value without name attribute: boolean

我试图找出这个错误的原因,它在我尝试获取应用程序的共享首选项时发生在启动时。代码只是:settings=this.getSharedPreferences(Globals.PREFS_NAME,0)似乎是一个损坏,但该错误存在于应用程序中,因为我已将其安装在多个设备上并且发生了相同的错误。我已经卸载了应用程序并重新安装它无济于事。也做了一个完全干净的构建。我用谷歌搜索了这个错误,但似乎无法在其中找到任何内容。我之前工作正常。所以我很困惑。任何线索都将非常高度赞赏...问候,抢劫W/ApplicationContext(1541):getSharedPreferencesW/Applic

android - "deprecated"是什么意思?

这个问题不太可能帮助任何future的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况有关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visitthehelpcenter.关闭10年前。我是android的初学者,我正在学习互联网上的一些教程。我正在研究“tabactivity”,但在android网站上告诉我它已被弃用。这是什么意思?不用了?对不起英语不好谢谢

android - 覆盖安卓 :vmSafeMode attribute for debug builds

在尝试优化调试应用程序的构建和部署速度时,我发现在安装过程中执行/system/bin/dex2oat花费了大量时间。这是ARTaheadoftimecompiler.我发现当以API22为目标时,您现在可以停止ARTAOT编译:我看到部署速度有了显着提高,但我担心进行此更改可能产生的副作用。它一定会对运行时性能造成小的影响,但是启用android:vmSafeMode选项是否会产生任何其他后果?对于调试构建,是否可以在gradle构建文件中覆盖此属性?还是创建特定于调试的list文件是唯一的解决方案? 最佳答案 仅为调试构建启用a

安卓错误 :You must supply layout_width attribute

抱歉,因为我的标题与StackOverFlow上的许多其他标题相似,但这些解决方案均未解决我的问题。我正在使用RelativeLayout设计布局。在代码View中设计后,当我更改为图形View时,Eclipse通知:Youmustsupplyalayout_widthattribute.Youmustsupplyalayout_heightattribute..当我运行这个程序时,会注意到LogCat中的错误Causedby:java.lang.RuntimeException:BinaryXMLfileline#2:Youmustsupplyalayout_widthattribu