草庐IT

storage_drive

全部标签

android - Delphi Rio 无法读取设置了 READ_EXTERNAL_STORAGE 权限的外部存储

我有一个曾经在DelphiSeattle创建的项目,现在我想搬到DelphiRio。我使用findfirst/findnext读取外部SD卡上的目录结构i:=findfirst(datadir+'*',faanyfile,ts);datadir变量包含一个有效的目录。在西雅图,代码工作正常(返回值i=0)并且第一个目录条目在变量ts中返回。现在,在Rio上编译相同的代码,我得到一个返回错误值i=13(访问被拒绝)。我的项目中设置了READ_EXTERNAL_STORAGE权限。如果我将list文件中的targetSdkVersion(在Rio中自动设置为26)硬编码为19(即minSd

android - 启动Android模拟器时"There is not enough storage space on the device to store package"

我刚刚在VisualStudio2015中更新了Xamarin(这是VisualStudio建议的更新)。更新后,当我开始使用模拟器AVD_GalaxyNexus_ToolsForApacheCordova(Android4.4-API19)进行调试时,出现以下错误:The"InstallPackageAssemblies"taskfailedunexpectedly.System.AggregateException:Oneormoreerrorsoccurred.--->Xamarin.AndroidTools.AndroidDeploymentException:Internal

android - 从 Google Drive Android API 获取帐户名/电子邮件

我正在使用新的GoogleDriveAndroidAPI我可以连接并执行allthatitwillallowmetodo,但为了使用SpreadsheetService,我需要从登录用户中提取帐户名/电子邮件。我该怎么做?这是我连接GoogleDriveAPI的代码。它工作正常。privatevoidconnect(){if(isGooglePlayServicesAvailable()){if(mGoogleApiClient==null){mGoogleApiClient=newGoogleApiClient.Builder(this).addApi(Drive.API).addS

android - 无法解析 Firebase Storage getDownloadUrl() 方法

要将图像上传到Firebase存储,我在StorageReference的实例上附加了addOnSuccessListener。在覆盖onSuccess方法时,我在taskSnapshot的实例上调用getDownloadUrl()但它给我一个错误提示Can'tresolvemethodgetDownloadUrl()这个应用程序是我2个月前创建的,早些时候这个应用程序运行良好,getDownloadUrl()也运行良好。此外,在taskSnapshot实例中,当我按Ctrl+space时,在建议中我没有找到getDownloadUrl()方法。为什么会这样?onActivityRes

android - Google Drive API - Android - 如何获取驱动器文件 ID?

我正在尝试开发一个android应用程序,它可以读取存储在我的google驱动器文件夹中的xml文件,最初的想法是尝试打开该文件并处理内容。我读过GoogleDriveAPIdocsforandroid我到了迷路的地步,它正在处理文件内容。根据本指南,从驱动器打开文件的方法是这样的:DriveFilefile=...file.open(mGoogleApiClient,DriveFile.MODE_READ_ONLY,null).setResultCallback(contentsOpenedCallback);`搜索我意识到完整的代码(他们不包括那里):DriveFilefile=D

android - Drive API 中 AppFolder 的无效父文件夹错误

我收到无效的父文件夹错误,我已经看到使用资源ID而不是驱动器ID的解决方案,但这里的情况不同。我正在尝试访问AppFolder,这只是像这样使用GoogleApiClient:this.appFolder=Drive.DriveApi.getAppFolder(mGoogleApiClient);当我稍后尝试在其中创建文件时,出现上述错误。DriveFolder.DriveFileResultfileResult=appFolder.createFile(mGoogleApiClient,changeSet,driveContentsResult.getDriveContents())

android - 在模拟器中安装 50 mb apk 时出现 INSUFFICENT_STORAGE_MEMORY 消息

当我使用命令行在我的模拟器中安装50mbapk时,出现类似::的错误那么我有什么东西可以增加内存?更新:我有另一个错误,如::更新:我有另一个错误,如:: 最佳答案 你需要增加模拟器的虚拟内存如何增加模拟器的虚拟内存\\emulator-avd"EmulatorName"-partition-size500然后尝试安装你的apk 关于android-在模拟器中安装50mbapk时出现INSUFFICENT_STORAGE_MEMORY消息,我们在StackOverflow上找到一个类似的

android - java.io.FileNotFoundException :/storage/emulated/0/saved_images/grub. jpg:打开失败:ENOENT(没有这样的文件或目录)

我正在使用下面的代码将图像保存在sd卡中,但我一直收到下面的异常privatevoidSaveImage(BitmapfinalBitmap,Stringfilename){Stringroot=Environment.getExternalStorageDirectory().toString();FilemyDir=newFile(root+"/saved_images");myDir.mkdirs();Stringfname=filename;Filefile=newFile(myDir,fname);if(file.exists())file.delete();try{File

android - 为什么使用 FileProvider 我无法使用外部应用程序从 INTERNAL STORAGE 打开文件?

我创建了一个可以在其内部存储中导入文件的应用程序。为了使用外部应用程序(例如PF查看器或照片)打开文件,我尝试遵循以下指南:theofficialguide,topic1,topic2,topic3和topic4但没有成功。这是我的代码:在我的list中我的包裹值(value):package="com.myapp.catcher"我的文件路径.xml我的代码StringfileName=path.substring(path.lastIndexOf("/")+1);Stringshelf=path.substring(path.lastIndexOf("PRIVATE")+8,pat

android - 运行时异常 : Unable to create output dir:/storage/emulated/0/app_spoon-screenshots

我正在使用gradle-spoon-plugin为AndroidUI测试设置Spoon使用Spoon2.0.0快照。我的项目是使用AndroidGradle插件3.0.1设置的。当通过spoonRule.screenshot(activity,"hello")截屏时,我得到这个RuntimeException:java.lang.RuntimeException:Unabletocreateoutputdir:/storage/emulated/0/app_spoon-screenshotsatcom.squareup.spoon.SpoonRule.createDir(SpoonRu