Assets folder in android app (eclipse)

user2586419 picture user2586419 · Nov 5, 2013 · Viewed 26.4k times · Source

I had searched to create the assets folder in an android app, the solution which i had tried is <App Name>/src/assets/fonts/

but when i try to use a ttf file in my Application, i have an error :

the code :

mFace = Typeface.createFromAsset(mContext.getAssets(),"fonts/fontType.ttf");

and the error :

native typeface cannot be made

I don't know if the assets folder is in the good place.

Answer

Pankaj Kumar picture Pankaj Kumar · Nov 5, 2013

The problem is at the path of asset

<App Name>/src/assets/fonts/

should be

<App Name>/assets/fonts/

Read more at Directory Structure of an Android Project


Android project directory structure is as below

enter image description here