FAQ
As it says at the end, it could not find the name of the keystore you
want it to use, so it advises you to manually sign the package.
Android won't install an unsigned one.
On Jul 12, 1:53 pm, Progman3K wrote:
I copied the contents of */opt/android-ndk/samples/native-activity* to a
folder in my home.

I built the native activity sample with the command

*ndk-build clean
Clean: android_native_app_glue [armeabi]
Clean: native-activity [armeabi]
Clean: stdc++ [armeabi]

ndk-build NDK_DEBUG=0 V=1*
*Compile thumb  : native-activity <= main.c
/opt/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/ bin/arm-linux-androideabi-gcc
-MMD -MP -MF obj/local/armeabi/objs/native-activity/main.o.d.org -fpic
-ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__
-D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__  -Wno-psabi
-march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer
-fno-strict-aliasing -finline-limit=64
-I/opt/android-ndk/sources/android/native_app_glue -Ijni -DANDROID
-Wa,--noexecstack -O2 -DNDEBUG -g
-I/opt/android-ndk/platforms/android-9/arch-arm/usr/include -c  jni/main.c
-o obj/local/armeabi/objs/native-activity/main.o
Compile thumb  : android_native_app_glue <= android_native_app_glue.c
/opt/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/ bin/arm-linux-androideabi-gcc
-MMD -MP -MF
obj/local/armeabi/objs/android_native_app_glue/android_native_app_glue.o.d. org
-fpic -ffunction-sections -funwind-tables -fstack-protector
-D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__
-Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os
-fomit-frame-pointer -fno-strict-aliasing -finline-limit=64
-I/opt/android-ndk/sources/android/native_app_glue -DANDROID
-Wa,--noexecstack -O2 -DNDEBUG -g
-I/opt/android-ndk/platforms/android-9/arch-arm/usr/include -c
/opt/android-ndk/sources/android/native_app_glue/android_native_app_glue.c
-o obj/local/armeabi/objs/android_native_app_glue/android_native_app_glue.o
StaticLibrary  : libandroid_native_app_glue.a
/opt/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/ bin/arm-linux-androideabi-ar
crs obj/local/armeabi/libandroid_native_app_glue.a
obj/local/armeabi/objs/android_native_app_glue/android_native_app_glue.o
SharedLibrary  : libnative-activity.so
/opt/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/ bin/arm-linux-androideabi-g++
-Wl,-soname,libnative-activity.so -shared
--sysroot=/opt/android-ndk/platforms/android-9/arch-arm
obj/local/armeabi/objs/native-activity/main.o
obj/local/armeabi/libandroid_native_app_glue.a
/opt/android-ndk/platforms/android-9/arch-arm/usr/lib/libc.so
/opt/android-ndk/platforms/android-9/arch-arm/usr/lib/libstdc++.so
/opt/android-ndk/platforms/android-9/arch-arm/usr/lib/libm.so
-Wl,--no-undefined -Wl,-z,noexecstack
-L/opt/android-ndk/platforms/android-9/arch-arm/usr/lib -llog -landroid
-lEGL -lGLESv1_CM -llog
-Wl,-rpath-link=/opt/android-ndk/platforms/android-9/arch-arm/usr/lib
-lsupc++ -o obj/local/armeabi/libnative-activity.so
Install        : libnative-activity.so => libs/armeabi/libnative-activity.so
mkdir -p libs/armeabi
install -p obj/local/armeabi/libnative-activity.so
libs/armeabi/libnative-activity.so
/opt/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/ bin/arm-linux-androideabi-strip
--strip-unneeded  libs/armeabi/libnative-activity.so*

*android update project --name wikibooks-opengl --path . --target
"android-8" --subprojects
**Updated project.properties
Updated local.properties
Updated file ./build.xml
Updated file ./proguard-project.txt
Updated and renamed default.properties to project.properties
Updated local.properties
Added file ./bin/build.xml
Added file ./bin/proguard-project.txt**
*

*ant release*
*Buildfile: /home/jc/Desktop/Development/native-activity/build.xml

-set-mode-check:

-set-release-mode:

-release-obfuscation-check:
[echo] proguard.config is ${proguard.config}

-check-env:
[checkenv] Android SDK Tools Revision 20
[checkenv] Installed at /opt/android-sdk-update-manager

-setup:
[echo] Project Name: wikibooks-opengl
[gettype] Project Type: Application
[echo] Switching between debug and non debug build: Deleting previous
compilation output...

-build-setup:
[echo] Resolving Build Target for wikibooks-opengl...
[gettarget] Project Target:   Android 2.2
[gettarget] API level:        8
[echo] ----------
[echo] Creating output directories if needed...
[echo] ----------
[echo] Resolving Dependencies for wikibooks-opengl...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
[echo] ----------
[echo] Building Libraries with 'release'...
[subant] No sub-builds to iterate on

-pre-build:

-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] hasCode = false. Skipping aidl/renderscript/R.java

-pre-compile:

-compile:
[echo] hasCode = false. Skipping...

-post-compile:

-obfuscate:

-dex:
[echo] hasCode = false. Skipping...

-crunch:
[crunch] Crunching PNG Files in source dir:
/home/jc/Desktop/Development/native-activity/res
[crunch] To destination dir:
/home/jc/Desktop/Development/native-activity/bin/res
[crunch] Crunched 0 PNG files to update cache

-package-resources:
[aapt] No changed resources or assets. wikibooks-opengl.ap_ remains
untouched

-package:
[apkbuilder] Found modified input file
[apkbuilder] Creating wikibooks-opengl-release-unsigned.apk for release...

-post-package:

-release-prompt-for-password:

-release-nosign:
[echo] No key.store and key.alias properties found in build.properties.
[echo] Please sign
/home/jc/Desktop/Development/native-activity/bin/wikibooks-opengl-release-u nsigned.apk
manually
[echo] and run zipalign from the Android SDK tools.
[propertyfile] Updating property file:
/home/jc/Desktop/Development/native-activity/bin/build.prop
[propertyfile] Updating property file:
/home/jc/Desktop/Development/native-activity/bin/build.prop
[propertyfile] Updating property file:
/home/jc/Desktop/Development/native-activity/bin/build.prop
[propertyfile] Updating property file:
/home/jc/Desktop/Development/native-activity/bin/build.prop

-release-sign:

-post-build:

release:

BUILD SUCCESSFUL
Total time: 1 second*

*Contents of archive: bin/wikibooks-opengl-release-unsigned.apk*

*Testing     AndroidManifest.xml
Testing     resources.arsc
Testing     lib/armeabi/libnative-activity.so

Size:       14956
Compressed: 7444
*

I copy the .apk file by ssh to */sdcard* on the unit.

I tap on *wikibooks-opengl-release-unsigned.apk* in the MyFiles explorer

The installer window pops-up, it is titled *NativeActivity*
*    Do you want to install this application?
[Install] [Cancel]*

I tap *Install*.

A progress-bar flashes on-screen for a second.

Then the window changes to

*    Application not installed
[Done]
*
I am trying to get this to run on the following device:

Model number: *GT-I9000M*
Firmware version: *2.2*
Baseband version: *I9000UGKC1*
Kernel version: *2.6.32.9 shout.lee@SEP-09 #4*
Build number: *FROYO.UGKC1*
Processor: *ARMv7 rev 2 (v71)*

Does anyone have any idea at all why it fails to install? I didn't change
anything in the sample and simply built it.
Why doesn't it work?

Thanks in advance!
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to android-ndk@googlegroups.com.
To unsubscribe from this group, send email to android-ndk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 5 | next ›
Discussion Overview
groupandroid-ndk @
categoriesandroid
postedJul 12, '12 at 5:53p
activeJul 13, '12 at 5:57p
posts5
users3
websitedeveloper.android.com...

People

Translate

site design / logo © 2019 Grokbase