이런에러가뜨네요..?
코드는 mainactivity
mainactivity
-------------------------------------------------------------------------------------------
package com.example.emailtest;
import java.io.File;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button Btmail = (Button) findViewById(R.id.btEmail);
Btmail.setOnClickListener(new Button.OnClickListener() {
public void onClick(View v) {
Uri uri = Uri.parse("mailto:top@gmail.com");
Intent i = new Intent(Intent.ACTION_SENDTO, uri);
startActivity(i);
}
});
}
}
activity_main
-------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<Button
android:id="@+id/btEmail"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="send E-mail" />
</LinearLayout>
android manifest
-------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.emailtest"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.emailtest.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>