[Sorry for double post but it doesn't look like my original post
question got transmitted successfully, so I'm reposting my question
again. Sorry for the annoyance]
Hi,
I'm trying to build some sample apks in the android source code and
need some help, specifically ApiDemos.apk. I've downloaded the latest
snapshot of android from repo, but I've been unable to load the
application onto the emulator. I"m not sure if anyone else is having
the same problem with the latest or is it just the way I'm building.
Can anyone help? Below are the steps I did:
1) Go to <android-root> then do the following:
> source build/envsetup.sh
> lunch 1
> make clean
> make -j ENABLE_PV_LOGGING=1
2) After everything has finished building, cd to <android-
root>development/samples/ApiDemos/src/com/example/android/apis/media/
then open MediaPlayerDemo_Video.java. My goal here is I'd like to be
able to play a video file (local playback)
3) Edit path so it points to the appropriate media file. In my case:
65 if (path == "/sdcard/Ratatouille.3gp") {
4) Now attempt to compile and build the apk. I NEED HELP ON THIS :
( And I believe this is where I'm stuck. For some reason I cannot
create this on Eclipse IDE because its complaining that the project
has errors...even though I have not changed it whatsoever except
adding the path to the media.
So instead I tried running make from the console. Typing "make -f
Android.mk" from the ApiDemos directory doesn't work either, so I'm
assuming I should run make from <android-root>, so that's what I did
and here's the output:
build/core/product_config.mk:211: WARNING: adding test OTA key
============================================
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=
============================================
build/core/main.mk:180: implicitly installing apns-conf_sdk.xml
build/core/copy_headers.mk:15: warning: overriding commands for target
`out/target/product/generic/obj/include/libpv/getactualaacconfig.h'
build/core/copy_headers.mk:15: warning: ignoring old commands for
target `out/target/product/generic/obj/include/libpv/
getactualaacconfig.h'
target R.java/Manifest.java: ApiDemos (out/target/common/obj/APPS/
ApiDemos_intermediates/src/R.stamp)
Aidl: ApiDemos <= development/samples/ApiDemos/src/com/example/
android/
apis/app/IRemoteService.aidl
Aidl: ApiDemos <= development/samples/ApiDemos/src/com/example/
android/
apis/app/IRemoteServiceCallback.aidl
Aidl: ApiDemos <= development/samples/ApiDemos/src/com/example/
android/
apis/app/ISecondary.aidl
target Java: ApiDemos (out/target/common/obj/APPS/
ApiDemos_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: development/samples/ApiDemos/src/com/example/android/apis/
ApiDemos.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying out/target/common/obj/APPS/ApiDemos_intermediates/classes-
full-
debug.jar
Copying: out/target/common/obj/APPS/ApiDemos_intermediates/classes.jar
target Dex: ApiDemos
target Package: ApiDemos (out/target/product/generic/obj/APPS/
ApiDemos_intermediates/package.apk)
target Java: ApiDemosTests (out/target/common/obj/APPS/
ApiDemosTests_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Copying out/target/common/obj/APPS/ApiDemosTests_intermediates/
classes-
full-debug.jar
Copying: out/target/common/obj/APPS/ApiDemosTests_intermediates/
classes.jar
target Dex: ApiDemosTests
target Package: ApiDemosTests (out/target/product/generic/obj/APPS/
ApiDemosTests_intermediates/package.apk)
Finding NOTICE files: out/target/product/generic/obj/NOTICE_FILES/
hash-
timestamp
Combining NOTICE files: out/target/product/generic/obj/NOTICE.html
gzip -c out/target/product/generic/obj/NOTICE.html > out/target/
product/generic/obj/NOTICE.html.gz
Target system fs image: out/target/product/generic/obj/PACKAGING/
systemimage_unopt_intermediates/system.img
Install system fs image: out/target/product/generic/system.img
5) Now, I'm expecting that a "ApiDemos.apk" will get built, but after
doing the search from the <android-root> directory, no ApiDemos.apk
was generated. Looking at the build output, the only lead I have is
this "package.apk" that is build in "out/target/product/generic/obj/
APPS/ApiDemos_intermediates". At this point, I'm not sure if I'm
doing things right...but anyway, I have no other leads, so I'm
assuming this package.apk is my ApiDemos application
6) Launched the emulator
7) Ran adb install out/target/product/generic/obj/APPS/
ApiDemos_intermediates/package.apk
Unfortunately, the application didn't load, but instead saw the
following console error instead from adb:
912 KB/s (1970610 bytes in 2.108s)
pkg: /data/local/tmp/package.apk
Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]
Can anyone point out what I'm doing wrong here?
-RCP2278
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---