有没有在High Sierra(10.13)上使用Android模拟器的方法?
我跑的时候
./HAXM\ installation -u
Run Code Online (Sandbox Code Playgroud)
它说:
HAXM silent installation only supports macOS from 10.8 to 10.12 !
Run Code Online (Sandbox Code Playgroud) 生成(在代码中)Gmail中的字母化身的最佳方法是什么?这里有一个示例 https://drive.google.com/folderview?id=0B0Fhz5fDg1njSmpUakhhZllEWHM&usp=sharing
看起来应该是这样的:

我正在尝试创建文本文件并共享它(通过蓝牙,电子邮件..)
File file = null;
try {
file = createFile2(json);
} catch (IOException e) {
e.printStackTrace();
}
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, file);
shareIntent.setType(getString(R.string.share_contact_type_intent));
Run Code Online (Sandbox Code Playgroud)
这是createFile2()的乐趣:
public File createFile2(String text) throws IOException {
File file = new
File(getFilesDir() + File.separator + "MyFile.txt");
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file));
bufferedWriter.write(text);
bufferedWriter.close();
return file;
}
Run Code Online (Sandbox Code Playgroud)
logcat的:
Bundle? Key android.intent.extra.STREAM expected Parcelable but value was a java.io.File. The default value <null> was returned.
Bundle? Attempt to cast generated …Run Code Online (Sandbox Code Playgroud)