• <tfoot id='gQ6Ac'></tfoot>
    <legend id='gQ6Ac'><style id='gQ6Ac'><dir id='gQ6Ac'><q id='gQ6Ac'></q></dir></style></legend>

    <small id='gQ6Ac'></small><noframes id='gQ6Ac'>

        <bdo id='gQ6Ac'></bdo><ul id='gQ6Ac'></ul>
      <i id='gQ6Ac'><tr id='gQ6Ac'><dt id='gQ6Ac'><q id='gQ6Ac'><span id='gQ6Ac'><b id='gQ6Ac'><form id='gQ6Ac'><ins id='gQ6Ac'></ins><ul id='gQ6Ac'></ul><sub id='gQ6Ac'></sub></form><legend id='gQ6Ac'></legend><bdo id='gQ6Ac'><pre id='gQ6Ac'><center id='gQ6Ac'></center></pre></bdo></b><th id='gQ6Ac'></th></span></q></dt></tr></i><div id='gQ6Ac'><tfoot id='gQ6Ac'></tfoot><dl id='gQ6Ac'><fieldset id='gQ6Ac'></fieldset></dl></div>

        如何在 android studio 中编辑依赖项/外部库?

        时间:2023-07-13

            1. <legend id='QgLV1'><style id='QgLV1'><dir id='QgLV1'><q id='QgLV1'></q></dir></style></legend>
              <i id='QgLV1'><tr id='QgLV1'><dt id='QgLV1'><q id='QgLV1'><span id='QgLV1'><b id='QgLV1'><form id='QgLV1'><ins id='QgLV1'></ins><ul id='QgLV1'></ul><sub id='QgLV1'></sub></form><legend id='QgLV1'></legend><bdo id='QgLV1'><pre id='QgLV1'><center id='QgLV1'></center></pre></bdo></b><th id='QgLV1'></th></span></q></dt></tr></i><div id='QgLV1'><tfoot id='QgLV1'></tfoot><dl id='QgLV1'><fieldset id='QgLV1'></fieldset></dl></div>

                <tbody id='QgLV1'></tbody>
            2. <tfoot id='QgLV1'></tfoot>

                <small id='QgLV1'></small><noframes id='QgLV1'>

                  <bdo id='QgLV1'></bdo><ul id='QgLV1'></ul>
                  本文介绍了如何在 android studio 中编辑依赖项/外部库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有很多关于添加库和依赖项的信息,但我找不到任何关于能够实际编辑库的有用信息.

                  我在我的项目中添加了 https://github.com/jdamcd/android-crop 作为依赖项,但我想编辑它的一些功能,主要是布局相关的东西.但是,当我浏览 Android Studio 说的文件时生成文件夹下的文件,不应编辑",当我编辑它们时,一旦系统构建它们就会返回到它们的预编辑状态.

                  我还尝试在 notepad++ 中编辑文件,但出现了同样的问题(它们在构建时返回到预编辑状态).

                  有人可以告诉我如何编辑库或解决方法,我可以更改布局/一些 java,而无需将整个库复制并粘贴到我的项目中以使其可编辑?

                  提前致谢,

                  神速.

                  答案不是简单地使用以下代码将库作为依赖项添加到 build.gradle 文件中:compile 'com.soundcloud.android:android-crop:0.9.10@aar'

                  您必须将其添加为模块,而不仅仅是外部依赖项,然后您才能编辑文件.

                  如果有人想知道如何执行这些步骤:

                  1. 在根目录中创建库文件夹(随意命名),即您进入应用程序及其内容的第一个文件夹.
                  2. 下载库,解压.
                  3. 将步骤 2 中的文件夹放入您在步骤 1 中创建的文件夹中.
                  4. 将模块添加到 settings.gradle 中,如下所示:include ':LibraryContainingFolder:ActualLibFolder'
                  5. 同步和清理
                  6. 在Android Studio中进入项目结构,点击主模块,通常称为app,点击依赖选项卡,然后点击绿色加号,然后点击模块依赖".该模块应显示为包含文件夹,其中的库文件夹由冒号something:somethingElse"分隔.添加模块.
                  7. 同步、清理、构建等

                  解决方案

                  您应该将库作为模块添加到 Android Studio 中,方法是从您感兴趣的 Github 存储库中下载代码(并删除 dependencies 添加到 build.gradle)

                  然后按照此答案中的步骤操作:https://stackoverflow.com/a/16639227/1065810p>

                  There is a lot of information about adding libraries and dependencies, but I haven't been able to find any useful information on being able to actually edit a library.

                  I have added https://github.com/jdamcd/android-crop as a dependency in my project, but I would like to edit some of its features, mostly layout related stuff. However, when I go into browse the files Android Studio says "files under the build folder are generated and should not be edited" and when I edit them they are returned back to their pre-edited state once the system builds.

                  I also tried editing the files in notepad++ and the same problem occurs (they are returned to their pre-edited state on build).

                  Can someone tell me either how to edit the library or a workaround whereby I can change the layouts/some java without having to copy and paste the entire library into my project to make it editable?

                  Thanks in advance,

                  God speed.

                  Edit: The answer is instead of simply adding the library as a dependency in the build.gradle file using this code: compile 'com.soundcloud.android:android-crop:0.9.10@aar'

                  You have to add it as a module instead of just an external dependency, then you can edit the files.

                  If anyone is wondering how follows these steps:

                  1. Create library folder (call it whatever you want) in the root directory, i.e. the first folder you go into to get to the app and its contents.
                  2. Download the library, unzip it.
                  3. Put the folder from step 2 in the folder you created in step 1.
                  4. Add the module to the settings.gradle like so: include ':LibraryContainingFolder:ActualLibFolder'
                  5. Sync and clean
                  6. Go to project structure in Android Studio, click on the main module, normally called app, click on dependencies tab, then click the green plus, then click "Module dependency". The module should appear written as the containing folder and the library folder in it separated by colons 'something:somethingElse'. Add the module.
                  7. Sync, clean, buid etc.

                  解决方案

                  You should add the library as a module in Android Studio, by downloading the code from the Github repository you're interested in (and removing the line under dependencies that you added to build.gradle)

                  Then follow the steps in this answer: https://stackoverflow.com/a/16639227/1065810

                  这篇关于如何在 android studio 中编辑依赖项/外部库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                    <bdo id='QgTRj'></bdo><ul id='QgTRj'></ul>
                      <tbody id='QgTRj'></tbody>
                    <legend id='QgTRj'><style id='QgTRj'><dir id='QgTRj'><q id='QgTRj'></q></dir></style></legend>

                      <small id='QgTRj'></small><noframes id='QgTRj'>

                        <tfoot id='QgTRj'></tfoot>
                        <i id='QgTRj'><tr id='QgTRj'><dt id='QgTRj'><q id='QgTRj'><span id='QgTRj'><b id='QgTRj'><form id='QgTRj'><ins id='QgTRj'></ins><ul id='QgTRj'></ul><sub id='QgTRj'></sub></form><legend id='QgTRj'></legend><bdo id='QgTRj'><pre id='QgTRj'><center id='QgTRj'></center></pre></bdo></b><th id='QgTRj'></th></span></q></dt></tr></i><div id='QgTRj'><tfoot id='QgTRj'></tfoot><dl id='QgTRj'><fieldset id='QgTRj'></fieldset></dl></div>