PDA

View Full Version : Android build failed



JonyMnemonic
09-25-2011, 09:01 AM
Hi, I'm trying to build RTBarebones on android and i got this messages:




f:\proton\RTBareBones\android>call app_info_setup.bat

f:\proton\RTBareBones\android>set APP_NAME=RTBareBones

f:\proton\RTBareBones\android>set SMALL_PACKAGE_NAME=rtbarebones

f:\proton\RTBareBones\android>set PACKAGE_NAME=com.rtsoft.rtbarebones

f:\proton\RTBareBones\android>set PATH_TO_PROJECT_DIR_FROM_CYGWIN=/cygdrive/f/pr
oton/RTBareBones

f:\proton\RTBareBones\android>set EMULATOR_AVD=@gsmart

f:\proton\RTBareBones\android>set ANDROID_DEVICE1=HT019P803554

f:\proton\RTBareBones\android>set ANDROID_DEVICE2=HT848GZ55018

f:\proton\RTBareBones\android>set ANDROID_EMU=emulator-5554

f:\proton\RTBareBones\android>start emulator @gsmart

f:\proton\RTBareBones\android>F:\cygwin\bin\bash --login -i -c '/cygdrive/f/prot
on/RTBareBones/android/build.sh'
Android NDK: NDK installation path auto-detected: '/cygdrive/f/android-ndk-r4-cr
ystax'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: windows
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to windows
Android NDK: Host awk tool was auto-detected: awk
Android NDK: Host awk test returned: Pass
Android NDK: This NDK supports the following toolchains and target ABIs:
Android NDK: arm-eabi-4.2.1: armeabi
Android NDK: arm-eabi-4.4.0: armeabi armeabi-v7a
Android NDK: x86-4.2.1: x86
Android NDK: Found supported platforms: android-3 android-4 android-5 android-8
Android NDK: PLATFORM android-3 supports: arm
Android NDK: ABI arm sysroot is: /cygdrive/f/android-ndk-r4-crystax/build/plat
forms/android-3/arch-arm
Android NDK: PLATFORM android-4 supports: arm
Android NDK: ABI arm sysroot is: /cygdrive/f/android-ndk-r4-crystax/build/plat
forms/android-4/arch-arm
Android NDK: PLATFORM android-5 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/f/android-ndk-r4-crystax/build/plat
forms/android-5/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/f/android-ndk-r4-crystax/build/plat
forms/android-5/arch-x86
Android NDK: PLATFORM android-8 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/f/android-ndk-r4-crystax/build/plat
forms/android-8/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/f/android-ndk-r4-crystax/build/plat
forms/android-8/arch-x86
Android NDK: Found stable platform levels: 3 4 5 8
Android NDK: Found max platform level: 8
Android NDK: Looking for AndroidManifest.xml in /cygdrive/f/proton/rtbarebones/a
ndroid
Android NDK: Found it !
Android NDK: Found project path: /cygdrive/f/proton/rtbarebones/android
Android NDK: Parsing /cygdrive/f/proton/rtbarebones/android/jni/Application.mk
Android NDK: Found APP_PLATFORM=android-8 in /cygdrive/f/proton/rtbarebones/an
droid/default.properties
Android NDK: Defaulted to APP_BUILD_SCRIPT=/cygdrive/f/proton/rtbarebones/andr
oid/jni/Android.mk
Android NDK: Application 'local' is not debuggable
Android NDK: Selecting optimization mode through Application.mk: release
Android NDK: Building application 'local' for ABI 'armeabi'
Android NDK: Using target toolchain 'arm-eabi-4.4.0' for 'armeabi' ABI
Install : librtbarebones.so => /cygdrive/f/proton/rtbarebones/android/lib
s/armeabi

f:\proton\RTBareBones\android>if not exist libs/armeabi/librtbarebones.so ..\..\
shared\win\utils\beeper.exe /p

f:\proton\RTBareBones\android>rmdir assets /S /Q

f:\proton\RTBareBones\android>mkdir assets

f:\proton\RTBareBones\android>mkdir assets\interface

f:\proton\RTBareBones\android>xcopy ..\bin\interface assets\interface /E /F /Y
F:\proton\RTBareBones\bin\interface\font_trajan.rt font -> F:\proton\RTBareBones\
android\assets\interface\font_trajan.rtfont
F:\proton\RTBareBones\bin\interface\test.bmp -> F:\proton\RTBareBones\android\as
sets\interface\test.bmp
2 File(s) copied

f:\proton\RTBareBones\android>mkdir assets\game

f:\proton\RTBareBones\android>xcopy ..\bin\game assets\game /E /F /Y
File not found - game
0 File(s) copied

f:\proton\RTBareBones\android>mkdir assets\audio

f:\proton\RTBareBones\android>xcopy ..\bin\audio assets\audio /E /F /Y
File not found - audio
0 File(s) copied

f:\proton\RTBareBones\android>rmdir bin /S /Q

f:\proton\RTBareBones\android>rmdir gen /S /Q

f:\proton\RTBareBones\android>call ant debug
Buildfile: f:\proton\RTBareBones\android\build.xml
[setup] Android SDK Tools Revision 13
[setup] Project Target: Android 2.2
[setup] API level: 8
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] No library dependencies.
[setup]
[setup] ------------------
[setup]
[setup] WARNING: Attribute minSdkVersion in AndroidManifest.xml (4) is lower
than the project target API level (8)
[setup]
[setup] Importing rules file: tools\ant\main_rules.xml

-debug-obfuscation-check:

-set-debug-mode:

-compile-tested-if-test:

-dirs:
[echo] Creating output directories if needed...
[mkdir] Created dir: f:\proton\RTBareBones\android\bin
[mkdir] Created dir: f:\proton\RTBareBones\android\gen
[mkdir] Created dir: f:\proton\RTBareBones\android\bin\classes

-resource-src:
[echo] Generating R.java / Manifest.java from the resources...

-aidl:
[echo] Compiling aidl files into Java classes...

-pre-compile:

compile:
[javac] f:\proton\RTBareBones\android\build.xml:113: warning: 'includeantrun
time' was not set, defaulting to build.sysclasspath=last; set to false for repea
table builds
[javac] Compiling 21 source files to f:\proton\RTBareBones\android\bin\class
es
[javac]
[javac] WARNING
[javac]
[javac] The -source switch defaults to 1.7 in JDK 1.7.
[javac] If you specify -target 1.5 you now must also specify -source 1.5.
[javac] Ant will implicitly add -source 1.5 for you. Please change your bui
ld file.

-post-compile:

-obfuscate:

-dex:
[echo] Converting compiled files and external libraries into f:\proton\RTBa
reBones\android\bin\classes.dex...
[apply] unknown option: --output
[apply] usage:
[apply] dx --dex [--debug] [--verbose] [--positions=<style>] [--no-locals]

[apply] [--no-optimize] [--statistics] [--[no-]optimize-list=<file>] [--no
-strict]
[apply] [--keep-classes] [--output=<file>] [--dump-to=<file>] [--dump-widt
h=<n>]
[apply] [--dump-method=<name> ] [--verbose-dump] [--no-files] [--core-li
brary]
[apply] [--num-threads=<n>] [<file>.class | <file>.{zip,jar,apk} | <direct
ory>] ...
[apply] Convert a set of classfiles into a dex file, optionally embedded
in a
[apply] jar/zip. Output name must end with one of: .dex .jar .zip .apk.
Positions
[apply] options: none, important, lines.
[apply] dx --annotool --annotation=<class> [--element=<element types>]
[apply] [--print=<print types>]
[apply] dx --dump [--debug] [--strict] [--bytes] [--optimize]
[apply] [--basic-blocks | --rop-blocks | --ssa-blocks | --dot] [--ssa-step
=<step>]
[apply] [--width=<n>] [<file>.class | <file>.txt] ...
[apply] Dump classfiles, or transformations thereof, in a human-oriented
format.
[apply] dx --junit [-wait] <TestClass>
[apply] Run the indicated unit test.
[apply] dx -J<option> ... <arguments, in one of the above forms>
[apply] Pass VM-specific options to the virtual machine that runs dx.
[apply] dx --version
[apply] Print the version of this tool (1.6).
[apply] dx --help
[apply] Print this message.

BUILD FAILED
F:\android-sdk\tools\ant\main_rules.xml:487: The following error occurred while
executing this line:
F:\android-sdk\tools\ant\main_rules.xml:203: apply returned: 1

Total time: 1 second
can't find 'bin\RTBareBones-debug.apk' to install



Help!!!

Seth
09-25-2011, 09:09 AM
Hmm, why are you using the R4-crystax NDK version? You should install r6 of the regular NDK (http://developer.android.com/sdk/ndk/index.html), it now works with STL/etc, the crystax version is no longer needed.

I bet that will fix it. If for some reason it's important to keep using r4, you could revert back to an early version of the RTBareBones/android dir and it would probably work.

JonyMnemonic
09-25-2011, 09:34 AM
I installed r6 and got same errors.




f:\proton\RTBareBones\android>call app_info_setup.bat

f:\proton\RTBareBones\android>set APP_NAME=RTBareBones

f:\proton\RTBareBones\android>set SMALL_PACKAGE_NAME=rtbarebones

f:\proton\RTBareBones\android>set PACKAGE_NAME=com.rtsoft.rtbarebones

f:\proton\RTBareBones\android>set PATH_TO_PROJECT_DIR_FROM_CYGWIN=/cygdrive/f/pr
oton/RTBareBones

f:\proton\RTBareBones\android>set EMULATOR_AVD=@gsmart

f:\proton\RTBareBones\android>set ANDROID_DEVICE1=HT019P803554

f:\proton\RTBareBones\android>set ANDROID_DEVICE2=HT848GZ55018

f:\proton\RTBareBones\android>set ANDROID_EMU=emulator-5554

f:\proton\RTBareBones\android>start emulator @gsmart

f:\proton\RTBareBones\android>F:\cygwin\bin\bash --login -i -c '/cygdrive/f/prot
on/RTBareBones/android/build.sh'
Android NDK: NDK installation path auto-detected: '/cygdrive/f/android-ndk-r6b'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: windows
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to windows
Android NDK: Host awk tool was auto-detected: awk
Android NDK: Host awk test returned: Pass
Android NDK: Probing for 'cygpath' program
Android NDK: 'cygpath' found as: /usr/bin/cygpath
Using cygwin substitution rules:
/cygdrive/h => H:
/cygdrive/g => G:
/cygdrive/f => F:
/cygdrive/e => E:
/cygdrive/d => D:
/cygdrive/c => C:
/cygdrive/H => H:
/cygdrive/G => G:
/cygdrive/F => F:
/cygdrive/E => E:
/cygdrive/D => D:
/cygdrive/C => C:
/usr/lib => F:/cygwin/lib
/usr/bin => F:/cygwin/bin
/ => F:/cygwin
Android NDK: This NDK supports the following toolchains and target ABIs:
Android NDK: arm-linux-androideabi-4.4.3: armeabi armeabi-v7a
Android NDK: x86-4.4.3: x86
Android NDK: Found platform root directory: /cygdrive/f/android-ndk-r6b/platform
s
Android NDK: Found supported platforms: android-3 android-4 android-5 android-8
android-9
Android NDK: PLATFORM android-3 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/f/android-ndk-r6b/platforms/android
-3/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/f/android-ndk-r6b/platforms/android
-3/arch-x86
Android NDK: PLATFORM android-4 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/f/android-ndk-r6b/platforms/android
-4/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/f/android-ndk-r6b/platforms/android
-4/arch-x86
Android NDK: PLATFORM android-5 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/f/android-ndk-r6b/platforms/android
-5/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/f/android-ndk-r6b/platforms/android
-5/arch-x86
Android NDK: PLATFORM android-8 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/f/android-ndk-r6b/platforms/android
-8/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/f/android-ndk-r6b/platforms/android
-8/arch-x86
Android NDK: PLATFORM android-9 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/f/android-ndk-r6b/platforms/android
-9/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/f/android-ndk-r6b/platforms/android
-9/arch-x86
Android NDK: Found stable platform levels: 3 4 5 8 9
Android NDK: Found max platform level: 9
Android NDK: Looking for AndroidManifest.xml in /cygdrive/f/proton/rtbarebones/a
ndroid
Android NDK: Found it !
Android NDK: Found project path: /cygdrive/f/proton/rtbarebones/android
Android NDK: Parsing /cygdrive/f/proton/rtbarebones/android/jni/Application.mk
Android NDK: Found APP_PLATFORM=android-8 in /cygdrive/f/proton/rtbarebones/an
droid/default.properties
Android NDK: Defaulted to APP_BUILD_SCRIPT=/cygdrive/f/proton/rtbarebones/andr
oid/jni/Android.mk
Android NDK: Application 'local' is not debuggable
Android NDK: Selecting optimization mode through Application.mk: release
Android NDK: Adding import directory: /cygdrive/f/android-ndk-r6b/sources
Android NDK: Building application 'local' for ABI 'armeabi'
Android NDK: Using target toolchain 'arm-linux-androideabi-4.4.3' for 'armeabi'
ABI
Android NDK: Looking for imported module with tag 'cxx-stl/gnu-libstdc++'
Android NDK: Probing /cygdrive/f/android-ndk-r6b/sources/cxx-stl/gnu-libstdc++
/Android.mk
Android NDK: Found in /cygdrive/f/android-ndk-r6b/sources/cxx-stl/gnu-libstd
c++
Android NDK: Module 'rtbarebones' has C++ sources
Install : librtbarebones.so => libs/armeabi/librtbarebones.so

f:\proton\RTBareBones\android>if not exist libs/armeabi/librtbarebones.so ..\..\
shared\win\utils\beeper.exe /p

f:\proton\RTBareBones\android>rmdir assets /S /Q

f:\proton\RTBareBones\android>mkdir assets

f:\proton\RTBareBones\android>mkdir assets\interface

f:\proton\RTBareBones\android>xcopy ..\bin\interface assets\interface /E /F /Y
F:\proton\RTBareBones\bin\interface\font_trajan.rt font -> F:\proton\RTBareBones\
android\assets\interface\font_trajan.rtfont
F:\proton\RTBareBones\bin\interface\test.bmp -> F:\proton\RTBareBones\android\as
sets\interface\test.bmp
2 File(s) copied

f:\proton\RTBareBones\android>mkdir assets\game

f:\proton\RTBareBones\android>xcopy ..\bin\game assets\game /E /F /Y
File not found - game
0 File(s) copied

f:\proton\RTBareBones\android>mkdir assets\audio

f:\proton\RTBareBones\android>xcopy ..\bin\audio assets\audio /E /F /Y
File not found - audio
0 File(s) copied

f:\proton\RTBareBones\android>rmdir bin /S /Q

f:\proton\RTBareBones\android>rmdir gen /S /Q

f:\proton\RTBareBones\android>call ant debug
Buildfile: f:\proton\RTBareBones\android\build.xml
[setup] Android SDK Tools Revision 13
[setup] Project Target: Android 2.2
[setup] API level: 8
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] No library dependencies.
[setup]
[setup] ------------------
[setup]
[setup] WARNING: Attribute minSdkVersion in AndroidManifest.xml (4) is lower
than the project target API level (8)
[setup]
[setup] Importing rules file: tools\ant\main_rules.xml

-debug-obfuscation-check:

-set-debug-mode:

-compile-tested-if-test:

-dirs:
[echo] Creating output directories if needed...
[mkdir] Created dir: f:\proton\RTBareBones\android\bin
[mkdir] Created dir: f:\proton\RTBareBones\android\gen
[mkdir] Created dir: f:\proton\RTBareBones\android\bin\classes

-resource-src:
[echo] Generating R.java / Manifest.java from the resources...

-aidl:
[echo] Compiling aidl files into Java classes...

-pre-compile:

compile:
[javac] f:\proton\RTBareBones\android\build.xml:113: warning: 'includeantrun
time' was not set, defaulting to build.sysclasspath=last; set to false for repea
table builds
[javac] Compiling 21 source files to f:\proton\RTBareBones\android\bin\class
es
[javac]
[javac] WARNING
[javac]
[javac] The -source switch defaults to 1.7 in JDK 1.7.
[javac] If you specify -target 1.5 you now must also specify -source 1.5.
[javac] Ant will implicitly add -source 1.5 for you. Please change your bui
ld file.

-post-compile:

-obfuscate:

-dex:
[echo] Converting compiled files and external libraries into f:\proton\RTBa
reBones\android\bin\classes.dex...
[apply] unknown option: --output
[apply] usage:
[apply] dx --dex [--debug] [--verbose] [--positions=<style>] [--no-locals]

[apply] [--no-optimize] [--statistics] [--[no-]optimize-list=<file>] [--no
-strict]
[apply] [--keep-classes] [--output=<file>] [--dump-to=<file>] [--dump-widt
h=<n>]
[apply] [--dump-method=<name> ] [--verbose-dump] [--no-files] [--core-li
brary]
[apply] [--num-threads=<n>] [<file>.class | <file>.{zip,jar,apk} | <direct
ory>] ...
[apply] Convert a set of classfiles into a dex file, optionally embedded
in a
[apply] jar/zip. Output name must end with one of: .dex .jar .zip .apk.
Positions
[apply] options: none, important, lines.
[apply] dx --annotool --annotation=<class> [--element=<element types>]
[apply] [--print=<print types>]
[apply] dx --dump [--debug] [--strict] [--bytes] [--optimize]
[apply] [--basic-blocks | --rop-blocks | --ssa-blocks | --dot] [--ssa-step
=<step>]
[apply] [--width=<n>] [<file>.class | <file>.txt] ...
[apply] Dump classfiles, or transformations thereof, in a human-oriented
format.
[apply] dx --junit [-wait] <TestClass>
[apply] Run the indicated unit test.
[apply] dx -J<option> ... <arguments, in one of the above forms>
[apply] Pass VM-specific options to the virtual machine that runs dx.
[apply] dx --version
[apply] Print the version of this tool (1.6).
[apply] dx --help
[apply] Print this message.

BUILD FAILED
F:\android-sdk\tools\ant\main_rules.xml:487: The following error occurred while
executing this line:
F:\android-sdk\tools\ant\main_rules.xml:203: apply returned: 1

Total time: 1 second
can't find 'bin\RTBareBones-debug.apk' to install

JonyMnemonic
09-25-2011, 09:11 PM
After reinstalling android sdk r13 I succesfull compile and run. Thanks for help.

Seth
09-25-2011, 11:22 PM
Great, thanks for letting us know, this thread may help others with the same problem.