PDA

View Full Version : Yet another Android problem



kalango
05-18-2011, 04:43 PM
Trying to build "RTBarebones" on android and i got this error:

BUILD FAILED
D:\proton\RTBareBones\android\build.xml:111: Reference android.libraries.src not
found.
Already set up all the paths and modified the files needed and still got this error. I can not generate the APK because of this.
Help!

Seth
05-19-2011, 08:06 AM
Hmm. I think this means ANT can't figure out where your android SDK is.

Double check RTBareBones\android\local.properties - it should have a line like this:

sdk.dir=C:\\pro\\android-sdk-windows

Make sure that path is correct. Note, this is NOT the path to the NDK!! This is to the android-sdk, different beast.

If that's not it.. hmm.. it works here, maybe I need to grab the latest Android SDK and see if something broke. :sweatdrop:

kalango
05-19-2011, 02:47 PM
Hmm its was already like that.
Do you think the problem might be because my Android SDK is in a different drive?
Also when compiling the compiler says that there is no lib dependencies...
here is the full log (some of it in portuguese "/)


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

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

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

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

D:\proton\RTBareBones\android>set PATH_TO_PROJECT_DIR_FROM_CYGWIN=/cygdrive/d/pr
oton/RTBarebones

D:\proton\RTBareBones\android>set EMULATOR_AVD=@Emulator2.2

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

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

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

D:\proton\RTBareBones\android>start emulator @Emulator2.2

D:\proton\RTBareBones\android>C:\cygwin\bin\bash --login -i -c '/cygdrive/d/prot
on/RTBarebones/android/build.sh'
Android NDK: NDK installation path auto-detected: '/cygdrive/d/eclipse/android/n
dk_crystax'
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/d/eclipse/android/ndk_crystax/build
/platforms/android-3/arch-arm
Android NDK: PLATFORM android-4 supports: arm
Android NDK: ABI arm sysroot is: /cygdrive/d/eclipse/android/ndk_crystax/build
/platforms/android-4/arch-arm
Android NDK: PLATFORM android-5 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/d/eclipse/android/ndk_crystax/build
/platforms/android-5/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/d/eclipse/android/ndk_crystax/build
/platforms/android-5/arch-x86
Android NDK: PLATFORM android-8 supports: arm x86
Android NDK: ABI arm sysroot is: /cygdrive/d/eclipse/android/ndk_crystax/build
/platforms/android-8/arch-arm
Android NDK: ABI x86 sysroot is: /cygdrive/d/eclipse/android/ndk_crystax/build
/platforms/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/d/proton/rtbarebones/a
ndroid
Android NDK: Found it !
Android NDK: Found project path: /cygdrive/d/proton/rtbarebones/android
Android NDK: Parsing /cygdrive/d/proton/rtbarebones/android/jni/Application.mk
Android NDK: Found APP_PLATFORM=android-8 in /cygdrive/d/proton/rtbarebones/an
droid/default.properties
Android NDK: Defaulted to APP_BUILD_SCRIPT=/cygdrive/d/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/d/proton/rtbarebones/android/lib
s/armeabi

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

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

D:\proton\RTBareBones\android>mkdir assets

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

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

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

D:\proton\RTBareBones\android>xcopy ..\bin\game assets\game /E /F /Y
Arquivo não encontrado - game
0 arquivo(s) copiado(s)

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

D:\proton\RTBareBones\android>xcopy ..\bin\audio assets\audio /E /F /Y
Arquivo não encontrado - audio
0 arquivo(s) copiado(s)

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

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

D:\proton\RTBareBones\android>call ant debug
Buildfile: D:\proton\RTBareBones\android\build.xml
[setup] Android SDK Tools Revision 8
[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: D:\proton\RTBareBones\android\bin
[mkdir] Created dir: D:\proton\RTBareBones\android\gen
[mkdir] Created dir: D:\proton\RTBareBones\android\bin\classes

-pre-build:

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

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

-pre-compile:

compile:

BUILD FAILED
D:\proton\RTBareBones\android\build.xml:111: Reference android.libraries.src not
found.

Total time: 7 seconds
can't find 'bin\RTBareBones-debug.apk' to install
* daemon not running. starting it now on port 5037 *
* daemon started successfully *

I will try to download the latest SDK tools for android.

Seth
05-19-2011, 11:41 PM
Hmm, different drives shouldn't be a problem, I have my sdk in C:\ but my Proton dir on O:\.

It looks like the binary built just fine, it's just the final ant-based packing that is failing, hrm.

Is anybody else successfully able to build Android projects with Proton?

kalango
05-20-2011, 03:57 AM
After updating the sdk and reinstalling some stuff i got this:

-debug-obfuscation-check:

-set-debug-mode:

-compile-tested-if-test:

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

-resource-src:
[echo] Generating R.java / Manifest.java from the resources...
[aapt.exe] D:\proton\RTBareBones\android\AndroidManifest.xml: 2: error: No resou
rce identifier found for attribute 'installLocation' in package 'android'

BUILD FAILED
D:\eclipse\android\tools\ant\main_rules.xml:310: null returned: 1

Total time: 1 second
can't find 'bin\RTBareBones-debug.apk' to install
My SDK path is set as

sdk.dir=D:\\eclipse\\android

I tried a lot of stuff already.. nothing seem to work. Also tried to use ANT build.xml but it returned an error..
The .so lib is compiled, but ant seem to be pissing this off...

kalango
06-05-2011, 02:49 PM
Finally found the issue.
The new android ant build xml has some differences for the build step.
On the project build xml replace:

classpathref="android.libraries.jars">
<src path="${source.absolute.dir}" />
<src path="../../shared/android/src" />
<src path="${gen.absolute.dir}" />
<src refid="android.libraries.src" />
for:

classpathref="project.libraries.jars"> --change here
<src path="${source.absolute.dir}" />
<src path="../../shared/android/src" />
<src path="${gen.absolute.dir}" />
<src refid="project.libraries.src" /> --and here
also i had to change this line:

<fileset dir="${external.libs.absolute.dir}" includes="*.jar" />
to:

<fileset dir="./" includes="*.jar" />
so it worked well with barebones...
I wonder if this will work with the other examples..

kalango
06-08-2011, 02:32 AM
So, it works with the simpleApp too. I guess its success now.

Seth
06-08-2011, 02:48 AM
Thanks for posting the solution!