A little problem in Eclipse

Asked

Viewed 212 times

1

There was, yesterday, asked a question right here on the website regarding a problem in my Eclipse ADT. I heartily thank the lucky, whose name I don’t remember, for helping me! The way was to install a plugin in the SDK.

Even so, when building my Android projectiles in Eclipse ADT, I believe that the IDE suggests a modification in the code (these lamps!). Look what I’m talking about:

inserir a descrição da imagem aqui

This code model did not appear when the ADT plugin had been installed a few days ago, nor did the lamps appear.

If there is any problem or improvement in the code, what do I do?

  • Underlined object names/properties/methods are deprecated it is not recommended to use them, the bulb should be a suggestion of new or similar resource.

  • You can see the history of your participation here on the site by accessing your profile. To find out why the lamps put the mouse pointer over them.

1 answer

0


Underlined object names/properties/methods etc. are obsolete, it is not recommended to use them in new projects, the lamp should be a suggestion of the new or similar feature.

The class ActionBarActivity is obsolete as indicated in documentation in its place the Appcompatactivity

Change:

public class Tela extends ActionBarActivity

To:

public class Tela extends AppCompatActivity
  • Mm. I get it... I do what now?

  • Following the "advice" of the lamps, I managed to remove them. What happened in my code: add instruction: @Suppresswarnings("deprecation") Still, the underscore still exists!

  • In place of public class tela extends ActionBarActivity place public class tela extends AppCompatActivity, and do the correct import suggested by the eclipse. @Gabriel

  • VALEEEEU! Everything ran in compliant! Is there somewhere in this topic where I can mark the issue as resolved?

  • Yes on the left side there are arrows below them have a V that signals that this answer was accepted, enjoy and see How and why to accept an answer?. @Gabriel

Browser other questions tagged

You are not signed in. Login or sign up in order to post.