Android Application replacement package name and UI refactoring error problem

Source: Internet
Author: User

Package name is an identity assigned to each application in the Android system, and each application must have a different identity. In the application development process, it is sometimes possible to modify the package name, which summarizes the ways and problems of modifying package name, as well as an effective solution.

The package field in Androidmanifest.xml clearly indicates the name of the package, but it is not enough to modify the package name of the application simply by modifying the package field because the package name is directly related to the resource file R. caused in every acitvity file, there is a word, import (package name). R; Therefore, modifying the package name also requires that the package name of the sentence in all files be modified. The Android ADT provides a unified replacement tool, as shown in the following illustration:

If there is a Java class file in the project that is completely commented out when using Rename application package, a unexpected exception occured error message appears. Deleting the file or canceling the annotation should all solve the problem, in http://coollast.blog.51cto.com/6319475/1323473 and http://stackoverflow.com/questions/ It is mentioned in the 19680717/rename-package-name-inside-android-project/19681399#19681399.

But how to find out that the completely annotated class is not mentioned, especially when the project is larger, it is more useful to find out exactly what is being commented out. At first I was wondering if it was possible to check the error log's specific hints to see which one was causing the error, but there was no relevant file information found under the error log of Eclipse. It turns out that you can actually look through import (package name). R This sentence has not been commented out can be. That way, you can search->file->file search finds all files containing package name by searching package name, expands the query results, and looks for import (package name). R the case being annotated.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/extra/

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.