Vote count:
0
when i click on send button after that the simulator craches and i got the fallowing error message :
HAX is working and emulator runs in fast virt mode dyld: lazy symbol binding failed: Symbol not found: _utf8_write Referenced from: /Users/Nabil/Documents/Development/Android/sdk/tools/emulator64-x86 Expected in: flat namespace dyld: Symbol not found: _utf8_write Referenced from: /Users/Nabil/Documents/Development/Android/sdk/tools/emulator64-x86 Expected in: flat namespace
here is my class code :
public void Send (View view){
txtnum = (EditText)findViewById(R.id.txtNum);
txtmsg = (EditText)findViewById(R.id.txtMessage);
String phoneNo = txtnum.getText().toString();
String message = txtmsg.getText().toString();
try {
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(phoneNo, null, message, null, null);
Toast.makeText(getApplicationContext(), "SMS sent.",
Toast.LENGTH_LONG).show();
} catch (Exception e) {
Toast.makeText(getApplicationContext(),
"SMS faild, please try again.",
Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}
and my manifest code :
<uses-permission android:name="android.permission.SEND_SMS" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".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>
asked 41 secs ago
Android simulator craches when Using SmsManager to send SMS
Aucun commentaire:
Enregistrer un commentaire