Changing the user interface of an individual application (phone, contacts) in ICS AOSP

I have successfully modified several applications (Launcher, SMS, Gallery, Email, Calendar) of AOSP, but I have to deal with problems changing the applications Phone,Contacts .

I applied the following steps to modify Launcher,SMS,Gallery,Email,Calendar applications:

  • I downloaded ICS AOSP and imported a standalone application in eclipse.
  • I changed the package names .ie com.android.launcher2 to com.test.launcher2
  • After Step 1 and Step 2 I ran into errors in a separate application due to the lack of framework classes. I decided to import these missing classes in my application.
  • I have a modified interface of my application.
  • I ran the application on an emulator. It works great.

Now I encounter a problem when changing contacts, phone applications inside Step 3 :

-> When I import the java.* Or javax.* Frame classes in my application, the console tells me an error, for example Ill-advised or mistaken usage of a core class (java.* or javax.*) when not building a core library.

-> To solve the problems, I tried to include several jar libraries that were specified in the Android.mk file and were created when creating the loaded AOSP (ICS). But that did not solve my problem.

-> I think the com.android.phone.common jar file can solve the problem, but I cannot solve it, because I suspect that the classes are not in the file that I received from the assembly. So Iโ€™ve been trying to find it on the Internet since several days, but I couldnโ€™t find it.so , if anyone has a full (working) version of this jar file, please share it .

NOTE. My Windows 7 development machine has it, and my short-term goal is to change the interface of the Contact, Phone applications and launch it.

EDIT: Buildpath Screenshots enter image description hereenter image description here

EDIT After putting the TimSort.java package into the default package

enter image description here

I described this step in a github demo and said: "When I import TimSort.java, it tries to access some hidden method of the Arrays.java class, so I need to import this class." This error is the reason I created the java.util package, to include the Arrays.java class. Otherwise, I am pleased that I only imported TimSort.java.by, in the screenshot we can see a comment that says something specifically about the following two methods

+6
source share
1 answer

As I said in the last comment, the main problem is that you include java. * and javax. * that already exist in android.jar. So the builder thought you were building the main library until you do this.

I will just remove the java.util package. * in your project. And no mistakes. Android.jar already includes many packages, including java.xxx and javax.xxx. If there really is a missing Java base library that you should use, try refactoring.

Eclipse snapshot

I checked the Android source, dx will first check your source name by calling:

 private static void checkClassName(String name) { boolean bogus = false; if (name.startsWith("java/")) { bogus = true; } else if (name.startsWith("javax/")) { int slashAt = name.indexOf('/', 6); if (slashAt == -1) { // Top-level javax classes are verboten. bogus = true; } else { String pkg = name.substring(6, slashAt); bogus = (Arrays.binarySearch(JAVAX_CORE, pkg) >= 0); } } if (! bogus) { return; } /* * The user is probably trying to include an entire desktop * core library in a misguided attempt to get their application * working. Try to help them understand what happening. */ DxConsole.err.println("\ntrouble processing \"" + name + "\":\n\n" + IN_RE_CORE_CLASSES); errors++; throw new StopProcessing(); } 

IN_RE_CORE_CLASSES is the error line that you see on the console. This explains why it shows this error.

UPDATE:

Screenshot after adding TimSort.java.

Screenshot after adding TimSort.java

+5
source

All Articles