我正在尝试在sdcard文件夹下创建路径“/ package name / databases”。有谁得到了这个秘密?
答案 0 :(得分:1)
您使用fileobj.mkdir()
课程中的File
方法吗?检查目录是否已存在(如果不存在),然后创建它。Refer
不要忘记为外部存储编写权限WRITE_EXTERNAL_STORAGE
。
答案 1 :(得分:1)
只需选择父文件夹,然后点击小 + (“新建文件夹”)。再次为下一个子文件夹执行此操作。
答案 2 :(得分:0)
制作SD卡
Access to your Android SDK Tools folder and use command “mksdcard” in order to create one.
By default installation on Windows, the Tools folder should be here:
C:\Program Files\Android\android-sdk\tools
Using following syntax to create your desired SD Card
mksdcard [memory size] [output file]
For example, I’d like to create a SD card with 200 MB in memory and put the files in
C:\Personel\AndroidNewbie\SDCard with file named “sdcard_dev.iso“, I do like this:
mksdcard 256M C:\Personel\AndroidNewbie\SDCard\<span class="skimlinks-unlinked">sdcard_dev.iso</span>
然后
使用SD卡
You’ve done creating your desired SD Card, now you need it to be used by Android emulator. Open Eclipse,
access to your project.
On menu Run -> Run Configurations, click on Android Configuration on the left tree menu, click on tab
Target on the right pane. You will see at the bottom: “Additional Emulator Commandline Options” and an
Input/Edit box below:
Just type your input sdcard following syntax
-sdcard [sdcard location]
For example, with the SD Card I’ve created above, I type:
-sdcard C:\Personel\AndroidNewbie\SDCard\<span class="skimlinks-unlinked">sdcard_dev.iso</span>