当前位置: 首页 > 知识库问答 >
问题:

如何编辑集成在我的项目中的一些自定义android库(.aar)中的资产文件?

柳宾实
2023-03-14

我已经添加了一个android库.aar到我的android项目中。现在我想编辑一些js,在android库资产文件夹中存在的文本文件,而不是src文件。但是我不能编辑它,因为我没有那个android库资产文件夹的引用。谁能解释一下如何编辑android库资产文件夹中的文件。

共有1个答案

马哲
2023-03-14
We can go to the external libraries added to the project and check for the library and then try to open the folder from that library.

Example:-

**Steps to edit the integrated library resources(res) & assets files.**

**Step1:-**
Goto the External Libraries Section of your project in android studio and check for the your integrated library as shown in the below image. 
[![enter image description here][1]][1]


**Step2:-** 
Check for the res folder in the integrated library and right click on the res folder you will get a menu.As shown in the below image. 
[![enter image description here][2]][2]


**Step3:-** 
From the displayed menu select the option “Show in Explorer”.Then the integrated library window will be opened as shown in the below image.This is the path for the assets and res folder of the integrated library. Integrated library path will be similar to Eg: C:\Users\UserName\.gradle\caches\transforms-1\files1.1\integratedlibrary .aar\**************
[![enter image description here][3]][3]


  [1]: https://i.stack.imgur.com/OdhEi.png

  [2]: https://i.stack.imgur.com/sJgTa.png

  [3]: https://i.stack.imgur.com/kMjYy.png
 类似资料:
  • 在我的Android Studio项目中,我有两个子项目/模块:一个Android应用程序()和一个Android库项目()。依赖于。到目前为止还不错。 但是,需要导入AAR库才能正常工作。 因此我的配置如下: 包含 包含 现在,要包含我使用下面详细介绍的方法: 如何使用新的Gradle Android Build系统手动包含外部aar包 因此,在我的的中,我基本上有: 显然,我将dependen

  • 我试图在Android Studio中使用自定义字体,就像我们在Eclipse中所做的那样。但不幸的是,无法弄清楚将“资产”文件夹放在哪里!

  • 我创建了一个TextView库项目,其中我使用了自定义字体。我必须创建这个库,因为这个也将在其他三个项目中使用。我发现android库项目不支持资产/字体文件夹。如果我以这种方式使用,它会给我错误消息 这里是否有解决此问题的方法。另外,我必须在三个不同的应用程序中使用重复视图。还有我用来从library assets文件夹中获取字体的示例代码。

  • 我写了一些库,其中有一部分UI。此外,这个库使用另一个库。我想提供发行版来在任何应用程序中使用这部分UI。 我得库有下一个依赖项: /home/user/projects/mainapp/app/build/intermediates/explodede-aar/com.my.sdk/sdk/0.0.1/res/values/values.xml:78:21-29:找不到与给定名称匹配的资源:at

  • 从iOS 13开始,具有以下功能: 然而,资产目录没有任何方式添加“字体资产”。 我试过的: 在此处取字体(后记名称为)。 在资产目录中创建了名为的数据资产。 将字体文件重命名为并将其放入数据资产。 数据资产的现在如下所示: 尝试通过加载此字体 像这样: 在此之后,打印: 有什么办法让它起作用吗?