Android - Can't create handler inside thread that has not called Looper.prepare()

后端 未结 3 939
有刺的猬
有刺的猬 2020-12-29 06:04

I am developing a simple application using Google Maps V2 API just to get basics and I am facing this error:

09-09 21:21:41.154: E/AndroidRuntime(3796): FAT         


        
3条回答
  •  再見小時候
    2020-12-29 06:47

    Do this in your do in background...

    runOnUiThread(new Runnable() {
        public void run() 
        {
            if (items.equals("null")) 
            {
                Toast.makeText(getApplicationContext(), "No Event Found",Toast.LENGTH_LONG).show();
            }                   
            else {                       
            }   
        }
    });
    

提交回复
热议问题