Okhelp.cz

Recepty, články, nápady, programování. Dříve dum-zahrada, finance, internet a know-how.okhelp.cz Pro lepší výsledky hledání používejte i diakritiku.

ADT 20 Eclipse New Activity wizard cannot be complete due to support library

Issue:
When using New Activity wizard, ADT 20 asked to install Android Support library version 8 even though version 9 has been installed.

Pressing "Install/Update" then ADT popup a window downloading Support library, when finished nothing happen.
Pressing "Check Again" does nothing.
If i restarting Eclipse again this problem.

Notice: If you install new version ADT or update via SDK Manager, open SDK Manager standalone and close Eclipse.
Workaround:
- Close Eclipse
- Open SDK Manager standalone (c:\Program Files\Android\android-sdk-windows\SDK Manager.exe)
- Check the checkbox and uninstall Extras -> Android Support Library.
- Check again Extras -> Android Support Library and install it
- Restart Eclipse
- Try to create new project

android/new-activity-adt-20-issue.png

android/adt-20-support-library.png

396LW NO topic_id




AD

Další témata ....(Topics)


69

Timer task TimerTask run cancel Android example | timer-task-timertask-run-cancel-android-example


Update TextView from TimerTask, Handler, schedule, run, cancel TimerTask, Android example

public class TimerActivity extends Activity {
	TimerTask mTimerTask;
	final Handler handler = new Handler();
	Timer t = new Timer();	
TextView hTextView;
TableRow hTableRow;
Button hButton, hButtonStop;


private int nCounter = 0;
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        hTextView = (TextView)findViewById(R.id.idTextView);
        hButton = (Button)findViewById(R.id.idButton);
        hButton.setOnClickListener(mButtonStartListener);
        hButtonStop = (Button)findViewById(R.id.idButtonStop);
        hButtonStop.setOnClickListener(mButtonStopListener);

         
        
    } // end onCreate

View.OnClickListener mButtonStartListener = new OnClickListener() {
	public void onClick(View v) {
		doTimerTask();
    }
};



	
	View.OnClickListener mButtonStopListener = new OnClickListener() {
    	public void onClick(View v) {
    		stopTask();
    		
    	}
    };
    
    
    public void doTimerTask(){

    	mTimerTask = new TimerTask() {
    	        public void run() {
    	                handler.post(new Runnable() {
    	                        public void run() {
    	                        	nCounter++;
                                        // update TextView
    	                        	hTextView.setText("Timer: " + nCounter);

    	                        	Log.d("TIMER", "TimerTask run");
    	                        }
    	               });
    	        }};

            // public void schedule (TimerTask task, long delay, long period) 
    	    t.schedule(mTimerTask, 500, 3000);  // 

    	 }

    	  public void stopTask(){

    	   if(mTimerTask!=null){
    	      hTextView.setText("Timer canceled: " + nCounter);

    	      Log.d("TIMER", "timer canceled");
    	      mTimerTask.cancel();
    	 }
    
    }    
}


179

HTC Incredible 2 | htc-incredible-2


HTC Incredible 2 cena od 6 000 KCZ Kč (únor.2012)
Spokojenost uživatelů nadprůměrná.
HTC Incredible 2 je chytrý telefon s operačním systémem Android.
HTC Incredible 2 je (22.února2012) 7. nejpoužívanějším chytrým telefonem u programu Sky Map viz tabulka.

HTC Incredible 2 - video recense