I am trying to learn and test the log files. Below is my codes. How to overcome this issue?
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final String hello=getResources().getString(R.string.hello_world);
final String STRING_TAG = "Testing: ";
Log.i(STRING_TAG," String1 " + hello);
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction()
.add(R.id.container, new PlaceholderFragment())
.commit();
}
}
@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);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
/**
* A placeholder fragment containing a simple view.
*/
public static class PlaceholderFragment extends Fragment {
public PlaceholderFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container, false);
return rootView;
}
}
}
I get the following errors.
[2014-06-09 00:09:48 - test1] Android Launch!
[2014-06-09 00:09:48 - test1] adb is running normally.
[2014-06-09 00:09:48 - test1] Performing com.example.test1.MainActivity activity launch
[2014-06-09 00:09:48 - test1] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 't1'
[2014-06-09 00:09:52 - test1] Application already deployed. No need to reinstall.
[2014-06-09 00:09:52 - test1] Starting activity com.example.test1.MainActivity on device emulator-5554
[2014-06-09 00:09:55 - test1] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.test1/.MainActivity }
[2014-06-09 00:09:55 - test1] ActivityManager: Warning: Activity not started, its current task has been brought to the front
[2014-06-09 00:11:45 - test1] Dx