开发者

How to build Android source code with Google APIs?

I have repo the Android source code from http://source.android.com/. And successfully made a build and run with my emulator with my system.img.

But that is for standard emulator only. Where I can get开发者_开发技巧 the source code for google APIs addon? And how to build the google apis with my Android source code? So I can use my build on my emulator of Google APIs.


I know exactly what you are talking about, and I have been searching for hours for an answer. Eclipse actually sheds some light on this problem.

If you have not already done so configure an Android Eclipse project for "Run Configurations" using the Eclipse Run menu. On the Target tab set the "Deployment Target Selection Mode" to Manual. Then close the Run Configuration.

Then run your emulator with your system.img and right click on your Eclipse project and select "Run As" and "Android Application." This will open the Eclipse "Android Device Chooser." At the top you should see your Emulator/device (propably "emulator-5554") and AVD Name (probably "build" with angle brackets around it), and then the Target (probably a question mark - meaning unknown). I think this unknown Target is the root of the problem.

For an emulator or AVD to support Google APIs, the Android Target must say "Google APIs" (Google Inc.) with a green check to the left. But instead you and I get a question mark and an error message like "Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]" if we use "adb install google_api_project.pkg" or use Eclipse to run the application on the Emulator/device with the unknown Target.

It's hard to believe no one else has encountered this problem or published a solution for it. I am digging for compiler options for making the android source build against the Google APIs. When building the kernel I have already tried pulling the config from a Google API AVD and using that to build the kernel. I'm afraid to do make clean or make mrproper so all I do is rebuild with the new .config which does which does reuild with the new .config.

I am still looking for an answer to your question that you posed so clearly and concisely. It's just too bad no one seems to understand or care about the question... yet.

A little while later I found this: http://code.google.com/android/add-ons/google-apis/index.html This is getting interesting. Read closely for the part about "The add-on also provides a compatible Android system image that runs in the Android Emulator" but no instructions on how to build one.

And a little while later I found this: http://osdir.com/ml/Android-Developers/2009-10/msg00361.html It suggests to remove things like from your AndroidManifest if you put them in your build path. Now my application loads and runs. It's not completely function yet, but it loads and runs.

But the eclipse problem is still interesting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜