Androidstudio import internal dependency module summary, androidstudio Module

Source: Internet
Author: User

Androidstudio import internal dependency module summary, androidstudio Module

Today, I just found a good project from GitHub and want to import it into my own project. I also encountered some minor problems during the process. I would like to summarize it for review !!!!

1. First, extract the compressed package downloaded from GitHub, find the project file, and copy and paste it in the folder of the project you want to import !!! Then Build> Rebuild the Project and re-Build the Project.

 

 

2. An error occurred while building the file. Error Type:

Error: Execution failed for task': app: processDebugManifest '.
> Manifest merger failed: Attribute application @ icon value = (@ mipmap/ic_launcher) from AndroidManifest. xml: 7: 9-43
Is also present at [com. github. frank-zhu: pullzoomview: 1.0.0] AndroidManifest. xml: 13: 9-45 value = (@ drawable/ic_launcher ).
Suggestion: add'tools: replace = "android: icon" 'to <application> element at AndroidManifest. xml: 5: 5-18:19 to override.

3. solution: In Manifest. add tools: replace = "android: icon" to the application in the xml file. (If Theme conflicts, write: tools: replace = "android: icon, android: theme ") remember to add xmlns: tools = "http://schemas.android.com/toolsto the manifest and tag.

4. A Project can contain many modules that are completely independent from each other or dependent on each other. If you want a module to be dependent on one or more other modules, You need to declare the current Module as Library in the build. gradle file of the module.

 

You cannot use: apply plugin: 'com. android. application'

To use: appli plugin: 'com. android. library'

Then, you need to include the module name in the settings. gradle file under the top-level project directory.

Include ': app', 'moudle-name'

This is a success !!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.