Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android FileNotFoundException:/storage/simulated/0/xyz/a bc/abc_06-07-2017 06-12-121481589883.amr_Android_Dropbox Api_Filenotfoundexception - Fatal编程技术网

Android FileNotFoundException:/storage/simulated/0/xyz/a bc/abc_06-07-2017 06-12-121481589883.amr

Android FileNotFoundException:/storage/simulated/0/xyz/a bc/abc_06-07-2017 06-12-121481589883.amr,android,dropbox-api,filenotfoundexception,Android,Dropbox Api,Filenotfoundexception,我正试图将文件从我的设备存储上传到云端,但每当我尝试上传时,我都会遇到以下问题 java.io.FileNotFoundException: /storage/emulated/0/xyz/a bc/abc_06-07-2017 06-12-121481589883.amr: open failed: ENOENT (No such file or directory) 这是我的密码 DropboxInstance objDropboxInstance = new Drop

我正试图将文件从我的设备存储上传到云端,但每当我尝试上传时,我都会遇到以下问题

java.io.FileNotFoundException: /storage/emulated/0/xyz/a bc/abc_06-07-2017 06-12-121481589883.amr: open failed: ENOENT (No such file or directory)  
这是我的密码

        DropboxInstance objDropboxInstance = new DropboxInstance();
        String filePath = intent.getExtras().getString("filePath");
        // filePath is  = /storage/emulated/0/xyz/a bc/abc_06-07-2017 06-12-121481589883.amr
        StringBuilder sb = new StringBuilder();
        InputStream is;
        String name = "abc_06-07-2017 06-12-121481589883";
        try {
            File file = new File(filePath);           

            is = new FileInputStream(file);
            long size = f.length();
            objDropboxInstance.getDropBoxStorage(this).upload("/" + name, is, size, true);

        }
        catch(IOException ioe) {
            ioe.printStackTrace();
        }

我不知道发生了什么事。我认为这条路是正确的。但我不明白为什么我会犯这个错误。请推荐我

尝试缩短文件名并从文件路径中删除空格。@Ali文件名长度有限制吗?那么文件路径长度就不是问题了。你试过了吗?这可能有用