0

I imported the android browser source code into eclipse. But, i could not build the code due to many errors.

I referred to this link and tried the steps in the tutorial.

How to compile Browser source code for Android 4.0.3

But, i am facing some issues. I created the classes.dex.dex2.jar file. But inside the jar file i browsed through com/android/internal folder which is empty. I tried many times but facing the same issue.. I am working on windows 7 OS.

Kindly help me on resolving the issue.

Thanks in advance.

Error reason - internal and hidden APIs could not be imported in app.

Steps followed in fixing the build issue.

  1. Downloaded the android-10-internals folder from the following link. https://github.com/inazaruk/android-sdk/tree/master/platforms

  2. Unzipped the folder and copied the folders to android-sdk-platforms folder.

  3. Started Eclipse. Clicked on New project and entered project name and clicked Next. In list of android sdk, i did not see my newly added platforms.

  4. Closed Eclipse. Copied the android.jar and build properties file and pasted in android-sdk-platforms-android 10 folder.

  5. Browsed to eclipse - plugins folder and copied the adt jar file to a different location. Renamed it to zip file. Unzipped the file and changed the com/android/internal to com/android/internax and zipped the file and recreated the jar file.

  6. Replaced the jar file. Opened the eclipse.

7. Still in android-jar, i find the forbidden rule unremoved. All import errors still unresolved.

Please let me know if anything i am missing.

Community
  • 1
  • 1
Prem
  • 4,823
  • 4
  • 31
  • 63
  • I am trying in eclipse 3.2 emulator – Prem Aug 06 '12 at 05:00
  • I downloaded the android-10-internals folder and copied it to my sdk folder. But, in my eclipse these newly added platforms are not available still. – Prem Aug 06 '12 at 10:50
  • I tried creating a new android project with the modified android-10 platform. The project compiled and i deployed it on device successfully. Therefore, the android platform which i modified seems valid. But the browser app code which points to this android sdk still has errors. – Prem Aug 06 '12 at 17:29
  • I tried android=15-internals and now few of my issues are fixed. I guess my problem is due to the way i modify the jar file. My requirement is ... Inside my jar file, there are many folders and within one folder there is a class file. I should modify one letter in this class file. After this recreate the jar file. Approach i am following is changing file name to .zip and open the zipped archive and open the class file in a notepad and change the letter and again save the file and rename it. If any better approach pls let me know – Prem Aug 07 '12 at 17:42

2 Answers2

0

May be the problem with sdk. So, the importing packages showing errors. Refer this link:

Click here How to build the default browser application in android Os 4.0

Community
  • 1
  • 1
  • You have to download few jar files and adding to your application: Follow these links: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/provider/BrowserContract.java –  Aug 06 '12 at 06:24
  • http://grepcode.com/snapshot/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/ –  Aug 06 '12 at 06:25
  • thanks Lokesh ... Now i downloaded the android-10 folder (with customized android.jar file) and tried building the code. I made the changes in ADT also. But even after that i have the same rule in the android.jar ... – Prem Aug 06 '12 at 08:24
0

Friends,

I need the modified working version of android-adt.jar file. Only that will solve my problem. If anybody has tried it before and working please share the same.

Thanks.

Prem
  • 4,823
  • 4
  • 31
  • 63