我使用此代码共享我的应用的apk
ApplicationInfo app = getApplicationContext().getApplicationInfo();
String filePath = app.sourceDir;
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("*/*");
intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(filePath)));
startActivity(Intent.createChooser(intent, getResources().getText(R.string.share_app)));
当我将targetSdkVersion更改为28时显示此错误
android.os.FileUriExposedException: file:///...