現在、画面にテキストを表示しようとしていますが、プロジェクトが起動せず、正確な理由を見つけることができませんでした。この状況に遭遇した人はいますか?
ここで私はあなたの参照のためにあなたにすべてのものを詳細に与えました。以下を見つけてください
LOGCAT
08-13 16:02:58.823: D/AndroidRuntime(336): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
08-13 16:02:58.823: D/AndroidRuntime(336): CheckJNI is ON
08-13 16:02:58.953: D/AndroidRuntime(336): --- registering native functions ---
08-13 16:02:59.483: D/AndroidRuntime(336): Shutting down VM
08-13 16:02:59.483: D/dalvikvm(336): Debugger has detached; object registry had 1 entries
08-13 16:02:59.522: I/AndroidRuntime(336): NOTE: attach of thread 'Binder Thread #3' failed
コンソール
[2012-08-13 15:50:55 - print_testing] ------------------------------
[2012-08-13 15:50:55 - print_testing] Android Launch!
[2012-08-13 15:50:55 - print_testing] adb is running normally.
[2012-08-13 15:50:55 - print_testing] No Launcher activity found!
[2012-08-13 15:50:55 - print_testing] The launch will only sync the application package on the device!
[2012-08-13 15:50:55 - print_testing] Performing sync
[2012-08-13 15:50:55 - print_testing] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'Android22-API-8'
[2012-08-13 15:50:56 - print_testing] Application already deployed. No need to reinstall.
[2012-08-13 15:50:56 - print_testing] \print_testing\bin\print_testing.apk installed on device
[2012-08-13 15:50:56 - print_testing] Done!
DisplayActivity.java
public class DisplayActivity extends Activity
{
EditText edt1,edt2;
Button btn;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main1);
edt1 = (EditText)findViewById(R.id.editText1);
edt2 = (EditText)findViewById(R.id.editText2);
Button btn = (Button)findViewById(R.id.button1);
btn.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
if(edt1.getText().toString().equals("4545"))
{
String newLine = System.getProperty("line.separator");
System.out.println("Student name : Karan" + newLine + "Total no of Working days : 25"
+ newLine +"Total no of present days : 23 " + newLine + "Total no of Absent days : 2");
}
}
});
}
}
AndroidManifest.XML
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.print.testing"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8" android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name">
<activity
android:name=".DisplayActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN1" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>