When I try to compile the following code, I get two errors:
Details Syntax error on the resource path type type token "zero", invalid expression async tx. Java / Inactive Task Project / src / org / me / asynctask line 19 Java problem
Description of the resource path type type AsyncTask is not normal; This argument asyncTask.java / AsyncTask project / src / org / me / asynctask line 25 Java problem
package org.me.asynctask;
Can not parameter with import; Android.app Import Activity; Import android.content.Context; Importroid.os.Bundle; Import android.widget.TextView; Import android.widget.Toast; Import android.os. *; Public class extends asyncTask activity {/ ** is called when activity is created first * / @ Override Crate (bundled saved instenstate) {super. Contents (Saved Instantstate); SetContentView (R.layout.main);
TextViewMyTextView = new textView (this); TextView secondtext view = new text view (this); New MyAsyncClass () Execute (MyTeXview, Zero, SecureText); } Private class MyAsyncClass AsyncTask and lt; TextView, Zero, Zero & gt; {Protected TextView doInBackground (TextView TV) {tv.setText ("Your Asynchronous was successful!"); Return TV; } PostXextech (text view result) on protected void {reference reference = context.getApplicationContext (); Toast maritost = toast Maketext (reference, "complete asynchronous processing", toast.lnnhH_LOG); Mytoast.show (); }} Obviously AsyncTask is a normal (so why do I get those errors?
Comments
Post a Comment