Unparsed aapt error(s)! Check the console for output. 발생 시
이클립스에서 위의 에러 발생 시
메뉴에서 [Project] > [clean] 으로 처리하시오.
Posted by 홍반장
Posted by 홍반장
package com.froglamb.activity_life_cycle; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.TextView; public class ActivityLifeCycle extends Activity { private String TAG = "ActivityLifeCycle"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Log.i(TAG, "onCreate()"); //SecondaryActivity 추가 TextView text_view = (TextView) findViewById(R.id.text_view); text_view.setOnClickListener( new OnClickListener() { public void onClick(View v) { Intent intent = new Intent(ActivityLifeCycle.this, SecondActivity.class); startActivity(intent); } }); } @Override public void onStart(){ super.onStart(); Log.i(TAG, "onStart()"); } @Override public void onStop(){ super.onStop(); Log.i(TAG, "onStop()"); } @Override public void onResume(){ super.onResume(); Log.i(TAG, "onResume()"); } @Override public void onRestart(){ super.onRestart(); Log.i(TAG, "onRestart()"); } @Override public void onDestroy(){ super.onDestroy(); Log.i(TAG, "onDestroy()"); } @Override public void onPause(){ super.onPause(); Log.i(TAG, "onPause()"); } } |
package com.froglamb.activity_life_cycle; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.widget.TextView; public class SecondActivity extends Activity{ private String TAG = "ActivityLifeCycle"; @Override public void onCreate(Bundle savedInstanceBundle){ super.onCreate(savedInstanceBundle); Log.i(TAG, "SecondActivity/onCreate()"); TextView textview = new TextView(this); textview.setText("SecondActivity !!!"); setContentView(textview); } } |
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.froglamb.activity_life_cycle" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".ActivityLifeCycle" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name="SecondActivity" android:theme="@android:style/Theme.Translucent" /> </application> <uses-sdk android:minSdkVersion="8" /> </manifest> |
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/text_view" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> </LinearLayout> |
Posted by 홍반장
package com.froglamb.android_application_life_cycle; import android.app.Activity; import android.os.Bundle; import android.util.Log; public class AALCActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Log.i("AALCActivity", "onCreate"); } } |
Posted by 홍반장
Posted by 홍반장
Posted by 홍반장
- 홍반장
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |