我有一个用于Android系统的DESKTOP的可移植QT应用程序。 在此应用程序中,我有一个按钮,用于打开某个文件夹,您可以在其中保存程序的备份。 在台式机上可以完美运行,但是在Android系统上会出现错误。
Windows 64位系统,QT Creator 4.6.1,加密依赖项:boost_1_57_0,qrencode-4.0.2,openssl-1.0.2r,db-6.0.20,MiniUPnP,ifaddrs和apache-ant-1.9.4 >
void showBackups()
{
boost::filesystem::path pathBackups = GetDataDir() / "backups";
/* Open folder with default browser */
if (boost::filesystem::exists(pathBackups))
QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(pathBackups.string())));
}
来源:https://github.com/DigitalCoin1/SperoCoin_Android
实施承诺:https://github.com/DigitalCoin1/SperoCoin_Android/commit/e8ad0468be0a5274d5841ecc1467d9c2557a3e29
W/System.err(10372): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=file:///sdcard/Spero/backups typ=inode/directory }
W/System.err(10372): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1861)
W/System.err(10372): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1534)
W/System.err(10372): at android.app.Activity.startActivityForResult(Activity.java:4125)
W/System.err(10372): at android.app.Activity.startActivityForResult(Activity.java:4072)
W/System.err(10372): at android.app.Activity.startActivity(Activity.java:4396)
W/System.err(10372): at android.app.Activity.startActivity(Activity.java:4364)
W/System.err(10372): at org.qtproject.qt5.android.QtNative.openURL(QtNative.java:158)
W/System.err(10372): at org.qtproject.qt5.android.QtNative.startQtApplication(Native Method)
W/System.err(10372): at org.qtproject.qt5.android.QtNative$6.run(QtNative.java:359)
W/System.err(10372): at org.qtproject.qt5.android.QtThread$1.run(QtThread.java:61)
W/System.err(10372): at java.lang.Thread.run(Thread.java:818)