android - One line toasting error in java Incompatible types -


When I want to toast a line in Java, I get this error message:

 < Code> JavaTester.java:34: Incompatible types were found: Zero Required: android.widget.Toast Toast newToast = toast.makeText (this is "It's a liner", Toast. LNNHT_LOG). Show (); 1 error   

Has anybody found out what can I do to fix this error?

You do not have to declare the toast object < Pre> toast. Maketext (this is, "This is a liner", Toast. LNNGH_LOG). Show ();

You have toast shown

or if you need to customize your toast, call the 'show' Â '

  Toast newstost = Toast. Make text (this is, "it's a liner", toast.lnnhH_LOG); // Content here newToast.show ();    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -