小编Анд*_*чук的帖子

macOS high sierra上的Intel HAXM(10.13)

有没有在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)

android intel emulation

32
推荐指数
4
解决办法
3万
查看次数

像Gmail Android最佳实践的字母头像

生成(在代码中)Gmail中的字母化身的最佳方法是什么?这里有一个示例 https://drive.google.com/folderview?id=0B0Fhz5fDg1njSmpUakhhZllEWHM&usp=sharing

看起来应该是这样的:

Gmail信头像

gmail android photo letter avatar

3
推荐指数
1
解决办法
3932
查看次数

java.lang.ClassCastException:java.io.File无法强制转换为android.os.Parcelable

我正在尝试创建文本文件共享它(通过蓝牙,电子邮件..)

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)

serialization android file android-sharing

2
推荐指数
1
解决办法
5633
查看次数