How to merge two Android apps (master)

Source: Internet
Author: User

How to merge two Android apps (master)

Sometimes, because of the company's needs, it is required to merge the two apps to use the functions in the APP.

Platform: Studio


Mouse: QR code scanning and self-Project

Specific steps :/**
* 1. Copy the decompressed android/assets folder to the main folder of the project.
* 2. Copy the decompressed android/src/com folder to the java folder in the project.
* 3. Merge the decompressed android/AndroidManifest. xml file with the project configuration file,
* Merge the primary copy permission code and the code in the application node (note that after the merge, replace. com. google. zxing. client. android in the original file)
* 4. Merge the decompressed android/res folder with the res folder of the project.
* 5. Copy core-3.2.1.jar to project
* 6. rebuild Project
* 7. Copy the decompressed com folder in android-core \ src \ main \ java to the Java folder in the project.
* 8. Fixed the R File Import issue in the project.
* 9. Modify the startup Activity
*/


Prelude: 1. Download and decompress the QR code scan (open its project directory structure, as shown in)

2. Open your project directory: (create a new project manually)

3. Enable Automatic package Import in Studio: In Settings: Editor> General> Auto Import >>> select All and then OK

4. copy the decompressed android/assets folder to the main folder of the project. [because the ASSETS folder is not used in the personal project, copy it directly so that your project has an assets folder.]

5. Copy the decompressed android/src/com folder to the java folder in the project.

6. Merge the decompressed android/AndroidManifest. xml file with the project list file, and merge the primary copy permission code and the code in the application node.





The position of the personal project AndroidMaifest. xml is as follows:

7. (after merging, replace. com. google. zxing. client. android in the original file)

8. Merge the decompressed android/res folder with the res folder of the project.


9. Copy the core-3.2.1.jar to the project (that is, copy the files under lib to the Project)


Then click: rebuild project


10. Copy the decompressed com folder in android-core \ src \ main \ java to the Java folder in the project.




11. after the rebuild project, the project cannot find the R file. Fixed the import problem of the R file in the project. changed the name of the app r file package to the name of the R file package of the project. 12. modify Activity13: Project Final directory:



Finally, start in onCreate ();: Button click event

public void onClick(View view) {    startActivity(new Intent(this, CaptureActivity.class));    }
Scan the QR code and click the link to open zndj.

"Project source code download:

"QR code scan: click open link jar 2blr

Related Article

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.