Android Studio 添加Assets目录


Android Studio 添加Assets目录:

 

法一:

  

Since Android Studio uses the new Gradle-based build system, you should be putting assets/ inside of the source sets (e.g., src/main/assets/), if I understand correctly.

  

法二:

In Android Studio, right-click on the enter image description here folder and navigate to the Assets Folder.

enter image description here

On the next screen just click Finish.

enter image description here

It will create the assets folder in the main target source set.

enter image description here

 

 

 

法三:

 

Looking inside the .iml file of your project you will see the following line:


 <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />




Therefore the "assets" folder is already declared for Gradle but you need to create it under src/main/ (I'm using AS 0.4.2)

  

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM