[英]How to Resolve Action Bar Activity?
I am developing an app in Android Studio version 1.2.1.1. 我正在Android Studio 1.2.1.1版中开发应用程序。 In which I use minsdk 15 and I what to use GoogleMap but When i am adding compile 'com.google.android.gms:play-services:7.3.0' or compile 'com.android.support:appcompat-v7:22.1.1' in build.gradle.
在其中我使用minsdk 15,在使用GoogleMap时使用什么,但是当我添加时, 编译“ com.google.android.gms:play-services:7.3.0”或编译“ com.android.support:appcompat-v7:22.1”。在build.gradle中为1' 。 Then ActionBarActivity shows an error android.support.v7.app.actionbaractivity is deprecated .
然后,ActionBarActivity显示不赞成使用android.support.v7.app.actionbaractivity的错误。
I searched and found some suggestions to use AppCompatActivity instead of ActionBarActivity but it does not allow me to debug the application can anyone help me out in to resolve the error? 我搜索并找到了一些建议,以使用AppCompatActivity代替ActionBarActivity,但是它不允许我调试应用程序,有人可以帮助我解决该错误吗?
Thanks in advance 提前致谢
Then ActionBarActivity shows an error android.support.v7.app.actionbaractivity is deprecated.
然后,ActionBarActivity将显示错误android.support.v7.app.actionbaractivity被弃用。
That is not an error. 那不是错误。 It is a warning.
这是一个警告。 It is telling you that
ActionBarActivity
is deprecated. 它告诉您
ActionBarActivity
已过时。
If you look at the JavaDocs for ActionBarActivity
, you will see: 如果查看JavaDocs for
ActionBarActivity
,将会看到:
This class is deprecated.
此类已弃用。
Use AppCompatActivity instead.
请改用AppCompatActivity 。
So, replace ActionBarActivity
with AppCompatActivity
, and you will resolve the deprecation warning. 因此,将
ActionBarActivity
替换为AppCompatActivity
,您将解决弃用警告。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.