Where are the file templates in Android Studio 4.1 located?

半城伤御伤魂 提交于 2021-01-20 15:30:11

问题


I have trouble importing my custom file templates into Android Studio 4.1 Canary 5. In prior versions of Android Studio (up to 4.0) I used to copy my templates into

<Android Studio Installation>/Contents/plugins/android/lib/templates (I am using Mac)

But in 4.1, there are no templates there and when I copy mine there, they seem to be ignored.

Has anyone faced the same issue?

Thank you!


回答1:


Android Studio 4.1 uses a new templating API which is visible but not public yet - you can see a sample here, although I haven't been able to get this to work. Unfortunately in the process, Google seem to have removed the old way of adding templates.

For those interested in tracking progress, you can star the issue on Google's issue tracker system here.




回答2:


File > Settings> File and Code templates> press + icon to add new template



来源:https://stackoverflow.com/questions/61138322/where-are-the-file-templates-in-android-studio-4-1-located

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!