This article describes the Android simulator to achieve the mobile phone to add files to the SD card method. Share to everyone for your reference, specific as follows:
Add files directly to the emulator SD card in DDMS if there is an error like this: Failed to push XXXXX.txt on emulator-: Read-only file system error b
read and written by other applications, you can pass in: Openfileoutput ("Ljq.txt", context.mode_world_readable + context.mode_world_writeable);Android has its own security model, and when the application (. apk) is installed, the system assigns him a userid, and when the application accesses other resources such as files, it needs userid matching. By default, a
1, File cachedir = Context.getcachedir ();The application internal storage (data file private) file is stored in this path, do not need to request permission, when the application is uninstalled, the files in the directory will be deleted.It is important to note that the directory of this file is related to the storage location of the application,When the application is moved to an external storage device, the absolute path of the file is also changed
= [' Libs ']}}} dependencies {compile Filetree (dir:' Libs ', include: [' *.jar '])}So that you can pack so files into the APK, which is the author of a pro-test available.2. From QQ Group:Create a new directory within the project: Jnilibs folder (sibling to res directory), and then put so files in it without configuring Gradle to automatically packageThis method, not tested, but from official Google Docs,
useful.From QQ group: Android Studio Tech3. From Web page :1) Create an empty folder "Lib" at any location on the hard disk (note that the name is "Lib" instead of "Libs")2) Copy the Armeabi folder from the original Libs directory to the newly created Lib directory. (The. So file in the Armeabi folder will also be copied in)3) package The newly created "Lib" directory into a. zip file and rename it "Armeab
and jdgui are downloaded in the latest version. For details, see google code:
Dex2jar (google code)
For the latest version of jdgui (google code), see the official website
Procedure:
First, change the suffix of the apk file to zip and decompress it to obtain the classes. dex, which is compiled by a java file and then packaged by the dx tool. copy dex to dex2jar. the dex2jar-0.0.9.9 folder in the directory where bat is located.
Locate the directory o
less resources. So we must realize that these binary images placed in this directory may change during production. If you want to read an image bit stream and convert it into a bitmap, put the image file in the res/raw/directory to avoid automatic optimization.Res/layout/compiled as a screen layout (or part of the screen)XML fileRes/values/can be compiled into many types of resourcesXML file. Note: unlike other res/FolderIt can save any number of
Sharing a file (shared files)This series of articles in my study of Google Developer documentation combined with Google translation and their own understanding of the writing, I hope to learn Android development friends bring some convenience, due to the limited level of personal translation, so the content contains the original text and translation, I hope that the browser combined understanding, so as not
In the Android project folder, the main resource files are in the Res folder.
1:assets folder is stored without compiling the original file, that is, the folder inside the file will not be like Xml,java file is precompiled, you can store some pictures, Html,js, CSS and other documents.
Introduction to the 2:res folders inside multiple folders
Res/anim/xml files
Click Save and save the created file in/data/Directory, you can check: ddms -- file Explorer -- Data --
Select a file and click it to export the file for viewing. Click it to add other files.
After you click "save", the prompt box is displayed, indicating that the file is saved successfully. After you click "read", the prompt box displays file content: ×××××.
Layout File
Activity_main.xml
Business Layer
Whether it is text, image or sound, must be organized and stored in a certain format, so that the player will know how to parse this piece of data, for example, for the original image data, our common format is YUV, Bitmap, and for audio, the simplest common format is the WAV format.WAV format, like bitmap, are Microsoft developed a file format specification, they all have a similarity, is the whole file is divided into two parts, the first part is "File header", record important parameter infor
get more information about the configuration, it is highly recommended that you read the obfuscation user manual. Particularly useful are the Keep Options overview and Examples section. In the Problem Resolution section of the obfuscation manual, you'll find other common issues that your code may encounter during the obfuscation process.decode the obfuscated stack trace information (decoding obfuscated stack traces)When confusing the code and outputt
Summary of reading and writing methods for files in the memory of Android phones
Summary of reading and writing methods for files in the memory of Android phones
This article describes how to read and write files in the memory of
In the previous article, I introduced how to query the multimedia files in the sdcard in the program and display them in the playlist. However, if you delete or add some multimedia files in the sdcard, how can I update the playlist? Here I will share some of my solutions in the project, hoping to help you. First of all, I will briefly introduce how Android scans
"): /data/data/ Com.srain.cube.sample/files/file1External storage: Passed Context.getExternalFilesDir(String type) as type an empty string when fetched. typeThe system specifies several types:Environment.directory_music environment.directory_pictures ...Example Context.getexternalfilesdir (""): /storage/sdcard0/android/data/com.srain.cube.sample/f
How to extract and generate mp4 files in AndroidWith the gradual popularization of Android 4.4 and later versions, the MediaExtractor class introduced by Android 4.1 and the MediaMuxer class introduced by Android 4.3 can finally begin to officially "glow and Heat. MediaMuxer is mainly used to generate multimedia
applications;
Activity. mode_append // This mode checks whether the file exists and appends the content to the file. Otherwise, a new file is created.
// If you want the file to be read and written by other applications, You can input activity. mode_world_readable + activity. mode_world_writeable.
View the files generated by preferences (select the current file and export this file. You can see that
= [' Libs ']}}}dependencies {Compile Filetree (dir: ' Libs ', include: [' *.jar '])}So that you can pack so files into the APK, which is the author of a pro-test available.2. From QQ Group:Create a new directory within the project: Jnilibs folder (sibling to res directory), and then put so files in it without configuring Gradle to automatically packageThis method, not tested, but from official Google Docs,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.