What is AAPT (Android Asset Packaging Tool) and how does it work?

后端 未结 4 1302
忘掉有多难
忘掉有多难 2020-12-04 10:53

What does AAPT (Android Asset Packaging Tool) mean? How does it work?

Can I ship the .so file of one application in the APK file of another application

4条回答
  •  孤街浪徒
    2020-12-04 11:54

    When your application is compiled, AAPT generates the R class, which contains resource IDs for all the resources in your res/ directory. For each type of resource, there is an R subclass (for example, R.drawable for all drawable resources), and for each resource of that type, there is a static integer (for example, R.drawable.icon). This integer is the resource ID that you can use to retrieve your resource.

    SOURCE: https://developer.android.com/guide/topics/resources/accessing-resources.html (copy/pasted)

提交回复
热议问题