Home > Mobile >  Why error using Toast Java. Lang. NoClassDefFoundError: Failed resolution of: Landroid/view/
Why error using Toast Java. Lang. NoClassDefFoundError: Failed resolution of: Landroid/view/

Time:10-14

Why android development using Toast complains. Java lang. NoClassDefFoundError: Failed resolution of: $OnUnhandledKeyEventListener Landroid/view/view; But in other places have no problem, but use an error in the if I add notes,
Here using the Bmob save method to add data, and the location of the error log display is not in this Toast this line, but in an activity on the initialization of the layout of
The line of the setContentView method, which a great god knows the problem, the trouble to help, river's lake emergency!

Case R.i d.f aBu_anLiu:
On ThreadPools. GetInstance (FaBuActivity. This). The execute (new Runnable () {
@ Override
Public void the run () {
LeiRong=miaoShu. GetText (). The toString ();
PhoneNumber=number. GetText (). The toString ();
If (I==1) {
System. The out. Println (" 36 ");
//Toast. MakeText (FaBuActivity. This, "36", Toast. LENGTH_LONG), show ();
} else {
Informatica Informatica=new Informatica ();
Informatica. SetLeiBie (leiBie);
Informatica. SetXuanXiang (xuanXiang);
Informatica. SetLieRong (leiRong);
Informatica. SetPhoneNumber (phoneNumber);
Informatica. Save (new SaveListener () {
@ Override
Public void done (String s, BmobException e) {
If (e==null) {
Toast. MakeText (FaBuActivity. This "release" success, Toast. LENGTH_LONG), show ();
} else {
Toast. MakeText (FaBuActivity. This "release failure", Toast. LENGTH_LONG), show ();
}
}
});
}
}
});
break;

CodePudding user response:

Within the child thread using Toast the need to create a stars!
 
New Thread (new Runnable () {
@ Override
Public void the run () {
Looper.prepare();
Toast. MakeText (TwoActivity. This, "the child thread shows", Toast. LENGTH_SHORT), show ();
Looper.loop();
}
}).start();

CodePudding user response:

Add your toast in the middle try
Looper.prepare();
Toast. MakeText (FaBuActivity. This "release" success, Toast. LENGTH_LONG), show ();
Looper.loop();


Looper.prepare();
Toast. MakeText (FaBuActivity. This "release failure", Toast. LENGTH_LONG), show ();
Looper.loop();

CodePudding user response:

The
reference 1/f, the wind light cloud light v10 reply:
within the child thread using Toast the need to create a stars!
 
New Thread (new Runnable () {
@ Override
Public void the run () {
Looper.prepare();
Toast. MakeText (TwoActivity. This, "the child thread shows", Toast. LENGTH_SHORT), show ();
Looper.loop();
}
}).start();

Thank you, sure is the problem, combined with stars

CodePudding user response:

refer to the second floor usecf response:
add you toast among the try
Looper.prepare();
Toast. MakeText (FaBuActivity. This "release" success, Toast. LENGTH_LONG), show ();
Looper.loop();


Looper.prepare();
Toast. MakeText (FaBuActivity. This "release failure", Toast. LENGTH_LONG), show ();
Looper.loop();

Thank you, really is the problem, and stars
  • Related