2013年8月7日星期三

Help, android virtual machine running the program when the totalemergence of this



Every time an activity is passed intend to jump to another when it pops up this and how to solve ah
------ Solution -------------- ------------------------------
configuration file is not configured to jump.
------ For reference only -------------------------------------- -


how to get ah
------ For reference only ------------------------------ ---------
configuration file to configure a activity (to jump)
------ For reference only -------------- -------------------------

------ For reference only --------------------------- ------------

see is what I wrote down why not ah
------ For reference only - -------------------------------------
AndroidManifest.xml Lane configuration
android: name = ". otherActivity"
android: screenOrientation = "landscape">

yet?
------ For reference only -------------------------------------- -

after him out of this plus a

------ For reference only ----- ----------------------------------
where you load, take a look?
------ For reference only -------------------------------------- -

just a beginning of the code is another section of hair Here is my knock during the

------ For reference only ----- ----------------------------------
ortherActivity do not you? How to become Result of? Write the whole path, take package name, main.XX.ortherActivity
------ For reference only ------------------------ ---------------

not work or not, can leave a QQ, QQ us to discuss, and I gave you the code to send over
------ For reference only ---------------------------------------
This is a small problem, slowly adjust, I have no use qq a year.
------ For reference only -------------------------------------- -

This is MainActivity.java
package main.activity_02;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class MainActivity extends Activity {


private EditText factorOne;
private EditText factorTwo;
private Button myButton;
private TextView myTextView;
protected void onCreate (Bundle savedInstanceState) {

super.onCreate (savedInstanceState);
setContentView (R.layout.activity_main);
factorOne = (EditText) findViewById (R.id.factorOne);
factorTwo = (EditText) findViewById (R.id.factorTwo);
myButton = (Button) findViewById (R.id.myButton);
myTextView = (TextView) findViewById (R.id.myTextView);
myTextView.setText ("multiply");
myButton.setText ("equal");
myButton.setOnClickListener (new CalculateListener ());
}

@ Override
public boolean onCreateOptionsMenu (Menu menu) {
/ / Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater (). inflate (R.menu.main, menu);
menu.add (0, 1, 1, R.string.exit);
return true;

}
class CalculateListener implements OnClickListener {

/ / @ Override

public void onClick (View v) {
/ / TODO Auto-generated method stub
String str1 = factorOne.getText (). toString ();
String str2 = factorTwo.getText (). toString ();
Intent intent = new Intent ();
intent.putExtra ("one", str1);
intent.putExtra ("two", str2);
intent.setClass (MainActivity.this, ResultActivity.class);
MainActivity.this.startActivity (intent);
}

}

}


------ For reference only ---------------------------------- -----
This is ResultActivity.java



package main.activity_02;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

public class ResultActivity extends Activity {
private TextView resultTextView;

protected void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
setContentView (R.layout.result);
resultTextView = (TextView) findViewById (R.id.myTextView2);
Intent intent = getIntent ();
String factorStr1 = intent.getStringExtra ("one");
String factorStr2 = intent.getStringExtra ("two");
int factorInt1 = Integer.parseInt (factorStr1);
int factorInt2 = Integer.parseInt (factorStr2);
int factorInt3 = factorInt1 * factorInt2;
resultTextView.setText (factorInt3 + "");
}
}

------ For reference only ---------------------------------- -----
run time so that the
[2013-08-02 15:05:47 - Activity_02] Android Launch!
[2013-08-02 15:05:47 - Activity_02] adb is running normally.
[2013-08-02 15:05:47 - Activity_02] Performing main.activity_02.MainActivity activity launch
[2013-08-02 15:05:47 - Activity_02] Automatic Target Mode: launching new emulator with compatible AVD 'Android4.2.2'
[2013-08-02 15:05:47 - Activity_02] Launching a new emulator with Virtual Device 'Android4.2.2'
[2013-08-02 15:05:49 - Activity_02] New emulator found: emulator-5554
[2013-08-02 15:05:49 - Activity_02] Waiting for HOME ('android.process.acore') to be launched ...
[2013-08-02 15:07:04 - Activity_02] HOME is up on device 'emulator-5554'
[2013-08-02 15:07:04 - Activity_02] Uploading Activity_02.apk onto device 'emulator-5554'
[2013-08-02 15:07:09 - Activity_02] Failed to install Activity_02.apk on device 'emulator-5554': timeout
[2013-08-02 15:07:09 - Activity_02] Launch canceled!

------ For reference only ---------------------------------- -----
start when the first not to move him, wait a minute, fully start again point *
------ For reference only ------------ ---------------------------


or why not ah ......
------ For reference only ---------------------------- -----------


not reported the error, but still out of my 1L put that figure
------ For reference only ------------------- --------------------

  
not reported the error, but still out of my 1L put that figure  

you this is the program itself can not solve the problem. That white is the procedure itself has serious BUG.
not without error, but Andrews and the general way of being given the way in java just not the same. .
you open your LogCat look certainly a lot of red tips. .
In addition to Andrews Andrews is the best forum or send
------ For reference only ------------------------ ---------------



Thank you restart the next eclipse just fine thank you!

没有评论:

发表评论