I am Creating RobotoTextView When I add .ttf file to Assets Folder. The below error is error :
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:
Error: Cannot copy
/Users/BizSalt/Projects/Gargi/Gargi.Droid/Assets/fonts/ to
/Users/BizSalt/Projects/Gargi/Gargi.Droid/obj/Debug/assets/fonts/, as
the source file doesn't exist. (Gargi.Droid)
I try to clean and Rebuild Project. and also Restart the Xamarin Studio but nothing get success.
Any help be Appreciated ??
You mention that the .ttf file is in the Assets folder - is it set to Build Action: AndroidAsset as well?
How are you accessing the font when assigning it to the TextView?
I think this thread on the Xamarin forums will be of further use to help diagnose your issue without knowing more about what you're doing.
Related
I'm trying to import a ZIP file into my Android Studio, but it always comes up with this error:
For your information, the ZIP file when converted into APK is the Rosemary font from Samsung FlipFont modded to insert custom fonts into One UI 2. I don't have any APK file for this, and only a ZIP file. How can I fix this? Help would be greatly appreciated!
Have you tried changing the project folder location and tried re-importing??
I have a Xamarin.Forms app that needs to read data from a json file. I placed the file into the Android assets folder and selected the build action AndroidAssets
Then I try to load the file in MainActivity with Assets.Open(filename) and I get a FileNotFoundException. I deleted the Android and PCL bin folders and tried to build the project again but got the same result. Then I opened the .apk file in WinRar and when I go to the assets folder, the files that I added to the project are not there.
Does anyone have any idea what's the problem here?
Did you set the files as embedded resources from the file properties?
If you not, right click on the file -> Properties -> set as Embedded Resources in Build Action
The problem was with using the "-" character in resource file names. Changed it as suggested by York Shen and it started working as it was supposed to.
I am following the steps mentioned here: https://priyankvex.wordpress.com/2015/08/30/how-to-build-tesseract-ocr-library-for-android-studio/
Step 3 tells to copy and paste the tess-two folder to my Project but when I paste, I get an error stating Cannot create class-file and none of my `.java' files get copied.
Where am I going wrong?
I don't know what the problem is but it works, if you copy the folder directly into the project folder instead of copying through the Android Studio.
Maybe for some reason the files are not copied in the Android Studio.
It is because some .class files are included in your copy files.
Some IDE will not include .class file in project and show this tips.
I have a True type Fonts file which contains fonts of Rockwell.I need to put it in assets folder in android studio.But i am not able to put it.Can anyone tell how to do this?
Just create assets directory under your main directory of your project (src/main/assets). copy and paste it in that folder and use it.
these links maybe useful for complete information : gradle based projects
when i try to create a webView in android studio and point it here: file:///src/main/assets/www/index.html, it keeps saying that it can not find the file path.
Thanks in advance.
Mitch
Use file:///android_asset/www/index.html. There is no src/main/assets/ directory on the device -- that is simply how your project is structured. Assets are packaged as part of the ZIP archive that is the APK file; file:///android_asset/ is a means for WebView to pull from the project assets.