warning while trying to display google ads
<p>I am trying to display my google ads and i am doing it in oncreate method.</p>

<p>here is what i am doing.</p>

<pre><code>protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.cities);



        AdView adView = new AdView(this, AdSize.BANNER, "a150cb2e3184cd");
        LinearLayout addLay = (LinearLayout) findViewById(R.id.addlay);

        AdRequest adRequest = new AdRequest();
        // adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
        addLay.addView(adView);
        adRequest.setTesting(true);
        adView.loadAd(adRequest);
</code></pre>

<p>But when i am running my application i am getting the following warning and screen transition is slow. </p>

<p>here is the warning</p>

<pre><code>03-20 05:07:22.952: W/webview_proxy(8998): java.lang.Throwable: Warning: A WebView method was called on thread 'AsyncTask #4'. All WebView methods must be called on the UI thread. Future versions of WebView may not support use on other threads.
03-20 05:07:22.952: W/webview_proxy(8998):  at android.webkit.WebView.checkThread(WebView.java:1876)
03-20 05:07:22.952: W/webview_proxy(8998):  at android.webkit.WebView.loadDataWithBaseURL(WebView.java:859)
03-20 05:07:22.952: W/webview_proxy(8998):  at c.a(Unknown Source)
03-20 05:07:22.952: W/webview_proxy(8998):  at c.doInBackground(Unknown Source)
03-20 05:07:22.952: W/webview_proxy(8998):  at android.os.AsyncTask$2.call(AsyncTask.java:287)
03-20 05:07:22.952: W/webview_proxy(8998):  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
03-20 05:07:22.952: W/webview_proxy(8998):  at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
03-20 05:07:22.952: W/webview_proxy(8998):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
03-20 05:07:22.952: W/webview_proxy(8998):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
03-20 05:07:22.952: W/webview_proxy(8998):  at java.lang.Thread.run(Thread.java:856)
</code></pre>

<p>here is my AsyncTask class</p>

<pre><code>public class CityData extends AsyncTask&lt;Integer, Void, String&gt; {

        @Override
        protected void onPostExecute(String result) {
            // TODO Auto-generated method stub
            super.onPostExecute(result);
            try {
                if (!lstresponse.isEmpty()) {
                    lstresult.addAll(lstresponse);
                    lstcities.setAdapter(CustAdapter);
                }
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        @Override
        protected String doInBackground(Integer... params) {
            // TODO Auto-generated method stub

            SendRequesttoServer();
            return "1";
        }

        @Override
        protected void onPreExecute() {
            // TODO Auto-generated method stub
            super.onPreExecute();

        }

    }
</code></pre>

<p>what is the mistake i am doing??..</p>

<p>Thanks:)        </p>
