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/