草庐IT

fileNotFoundException

全部标签

java.io.FileNotFoundException : No content provider: 错误

我在使用videoView.setVideoPath();复制视频时遇到问题事实上视频无法重现..我不知道为什么。视频路径正确。这是我的代码:publicclassMainActivityextendsAppCompatActivity{privateVideoViewvideoView;privateintposition=0;privateMediaControllermediaController;@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);

java - Android URL 连接 java.io.FileNotFoundException

我尝试向WordlPress网站发送一个普通的Http请求。这是网址:"http://localhost.com/api/submit_comment/?post_id=12345&name=Max&email=Max.Mustermann@googlemail.com&content=hallo"如果我用我的网络浏览器打开它,一切正常。如果我通过Android应用程序打开它,它会抛出java.io.FileNotFoundException。安卓代码:classSendCommentextendsAsyncTask{protectedStringdoInBackground(Stri

java - 获取 FileNotFoundException/EISDIR

我收到这个错误java.io.FileNotFoundException:/data/data/com.example.app/cache/news.xml:openfailed:EISDIR(Isadirectory)使用这段代码try{Filecache=ctx.getCacheDir();Strings=cache.getAbsolutePath()+File.separator+path;Filef=newFile(s);Filepf=f.getParentFile();if(pf!=null){pf.mkdirs();}if((pf.exists())&&(pf.isDire

java - 读取文件 - java.io.FileNotFoundException

publicvoidloadFile(intlevel){try{//CreatenewfilelevelFile=newFile("assets/levels.txt");fis=newFileInputStream(levelFile);isr=newInputStreamReader(fis);reader=newBufferedReader(isr);//Codetoreadthefilegoeshere但是,使用此代码时,我不断收到上述错误(java.io.FileNotFoundException)。该文件肯定存在于我的Assets文件夹中并且具有正确的名称。我在这里发现了

android - java.io.filenotfoundexception :/home/ljh/. android/analytics.settings(权限被拒绝)

当我启动Androidstudio时,我得到了couldnotinitializeanalytics,treatingasopt-out.java.io.filenotfoundexception:/home/ljh/.android/analytics.settings(permissiondenied)我该怎么办?我的操作系统是Ubuntu32位 最佳答案 解决方案是在你的ubuntu机器上安装这些32位库sudodpkg--add-architecturei386sudoapt-get-qqyupdatesudoapt-get

java - 尝试使用 Maps API 查找附近地点时出现 FileNotFoundException

我一直在学习教程,以便使用GoogleMaps和PlacesAPI创建一个显示附近地点的应用程序。具体来说,我正在尝试查看附近的餐馆或外卖店。事实上,应用程序显示mapfragment,但没有地方显示为标记。我尝试增加半径值,并将类型更改为此处列出的一些类型:https://developers.google.com/places/documentation/supported_types,但我得到了相同的FileNotFoundException错误。谁能看出哪里出了问题?这是我的LogCat。03-1317:21:51.076:E/GooglePlayServicesUtil(13

java - FileNotFoundException 打开失败 : ENOENT (No such file or directory)

我有一个名为“and.doc”的文件,其中包含大量记录,每个记录都具有这种形状表达:防御;所以我想用扫描仪读取文件使用;作为分隔符找到一种方法将表达式与定义分开并以某种方式将它们添加到我的Sqlite数据库中(如果有人知道如何做到这一点,那就太好了)。我正在使用这个代码try{mf=newFile("/home/agh/AndroidStudioProjects/Dicod/app/src/main/res/raw/and.doc");inputFile=newScanner(mf);inputFile.useDelimiter(";");while(inputFile.hasNext

android - FileOutputStream 因 FileNotFoundException 而失败,即使文件显然存在、可写且具有权限

虽然我是Android的新手,但我有基于Java和C的编程经验,目前我正在使用Eclipse和常用工具集进行开发。我已经阅读了大部分关于这个主题的帖子,我相信我已经包含/应用了所有的建议和测试。我以前使用FileOutputStream写入内部的、特定于应用程序的文件,为L8构建,没有任何问题。我现在正在尝试使用BuildL7forAndroid2.1写入SD卡上的文件。以下代码来self用来测试基本代码的具有3个按钮(写入、读取和发送)的单个Activity。尽管导致FileOutputStream(FOS)构造函数的所有包含的测试(存在、可写和createNewFile或mkdir

android - java.io.FileNotFoundException :/file/path. jpg 打开失败:ENOENT(没有这样的文件或目录)

我正在尝试将图像保存到parse.com.我需要将它转换为字节数组。我决定尝试这样做的方法是使用apachecommons-io.它不能正常工作。这是我的代码fragment;privatevoidsaveImage()throwsIOException{//TODOAuto-generatedmethodstubInputStreamheader=newFileInputStream("/ClashMMA/res/drawable-hdpi/beatdown.jpg");ParseFilefile=newParseFile(toByteArray(header));try{file.

android - 错误 :Execution failed for task ':app:compileDebugJavaWithJavac' . java.io.FileNotFoundException:

更新并重启androidstudio后,出现以下错误。Error:Executionfailedfortask':app:compileDebugJavaWithJavac'.java.io.FileNotFoundException:/.../Workspace/MyAppName/app/build/intermediates/exploded-aar/com.google.android.gms/play-services/8.3.0/jars/classes.jar(Nosuchfileordirectory)我已经尝试清理和重建我的项目,但每次我都遇到上述错误。编辑:我的gr