When running android app it showing error:
file:///android_asset/www/images/ajax-loader.gif Unable to open asset URL:file:///android_asset/www/images/go.jpg
Please help me to solve this.
Try the followings:
Make sure you have the file in the directory
Specify permission for read/write to the file
android file name are case-sensitive.
Why the gif and jpg both comes in one error...check it.
Related
I am trying to access pdf file from android phone in build envelope method of android sdk as
.uri("file:///storage/emulated/0/FileExplorer/")
.name("12_24_2020")
but its giving me error Invalid json and in logcat error as
2020-12-25 15:55:35.946 9439-9439/com.example.docusignapp E/main:
Unknown exception in loading document:
File is not a valid, parseable, password-free PDF.
My file is not password protected.
Kindly help and thanks in advance.
The SDK docs show the .uri parameter as the path to a specific file.
I suggest you try a specific file, not a file explorer.
I am getting this error while building my app. The drawable folder has the valid .jpg file and this is causing the error. How to bypass this? Also, I noticed that the path shown in the error is "main\res\routine\Routine.jpg", but there is no such folder in the project.
AGPBI: {"kind":"error","text":"The file name must end with .xml",
"sources":[{"file":"C:\\Users\\Lenovo\\AndroidStudioProjects\\project3\\app\\src\\main\\res\\routine\\Routine.JPG"}],
"tool":"Resource and asset merger"}```
UPDATE: solved the problem by reuploading the pic and saving it in drawable_V21. still dont know about that error message though. might be a bug
I guess that error you're experiencing is because of the file extension being in .JPG instead of .jpg try changing it. It may help somehow
I'm trying to assemble an Android build with my laptop with Ubuntu but I'm getting constantly the error on a file generated by dagger:
error: error while writing DaggerMyLibraryBookmarksComponent$com_testx_baseapplication_presentation_common_dagger_component_ApplicationComponent_userManagerRepository.class (File name too long)
This error is quite weird due that in other computers with same code and same SO I'm able to compile the project without any issue.
Has anyone experienced this issue?
The problem here was that I was using an encrypted folder in my /home partition. I just created a new folder outside the encrypted partition and the problem was solved.
This is due encrypted folders only accepts 144bytes class name files.
Same problem here!
My solution was to create a virtual image using "dd", format it in ext4 and mount it in my working folder. Worked like a charm!
Somthing like this:
https://www.tecmint.com/create-virtual-harddisk-volume-in-linux/
I am using the following code snippet to zip a directory:
http://www.jondev.net/articles/Zipping_Files_with_Android_(Programmatically)
I noticed that if the directory is big like >3MB. The created zip file is corrupted and I could not open it. It throws "Archive is in unknown format or corrupted." error in Windows.
Any idea how I can prevent this? For example if too big, then just zip till the threshold is reached. Or is there any other method?
I need to delete and recreate a directory in my Android (written with Mono) app when the user wants to change log in details. I delete the directory thus:
Directory.Delete(AppDataFolder, true);
However, when I try to recreate the directory, using:
Directory.CreateDirectory(aDirectory);
I get the following exception:
System.IO.IOException: Lock violation on path /storage/sdcard0/Telecetera/Connect For Android
I can't see how to fix this. Has anyone got any ideas?
Thanks