小编wii*_*eat的帖子

在Intellij IDEA中运行Android项目时出错

当我使用AVD在Intellij IDEA中运行我的android项目时,我收到此错误

android-apt-compiler:无法运行程序"/ Users/myAccount/Documents/android-sdk-macosx/platform-tools/aapt":error = 2,没有这样的文件或目录

有人可以帮忙吗?提前致谢!

android intellij-idea android-virtual-device

10
推荐指数
2
解决办法
5816
查看次数

在Android中使用Google云打印

我正在使用谷歌云打印与Android项目打印出PDF文件.我将文件存储在项目的assets文件夹中,当我打印时,它会显示"Document Missing".

这是我的代码

public void stevePrint(View view) {
    Intent printIntent = new Intent(this, PrintDialogActivity.class);
    //Cant find file, why?
    File file = new File("/assets/steve.pdf");
    printIntent.setDataAndType(Uri.fromFile(file), "document/pdf");
    printIntent.putExtra("title", "Steve");
    startActivity(printIntent);

    Context context = getApplicationContext();
    CharSequence text = "Sending to Google Cloud Print";
    int duration = Toast.LENGTH_LONG;

    Toast toast = Toast.makeText(context, text, duration);
    toast.show();
}
Run Code Online (Sandbox Code Playgroud)

任何帮助表示赞赏!

android google-cloud-print

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