PDA

View Full Version : build.bat failed on Windows using ndk-r8b + sdk 20.0.1



gerro
08-01-2012, 06:57 PM
Hi, I use the latest version of ant, proton, sdk and ndk.
After build.bat, I get this at the end :



-compile:
[javac] C:\protonsdk\RTBareBones\android\build.xml:149: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 13 source files to C:\protonsdk\RTBareBones\android\bin\classes

BUILD FAILED
C:\protonsdk\RTBareBones\android\build.xml:129: The following error occurred while executing this line:
C:\protonsdk\RTBareBones\android\build.xml:149: Reference project.libraries.jars not found.


Then I tried to replace the "<target name="-compile" ..." part inside C:\protonsdk\RTBareBones\android\build.xml from sdk-dir\tools\ant\build.xml. Then I get this output :


-compile:
[javac] Compiling 13 source files to C:\protonsdk\RTBareBones\android\bin\classes
[javac] C:\protonsdk\RTBareBones\android\temp_final_src\co m\rtsoft\rtbarebones\BillingService.java:21: error: package com.android.vending.billing does not exist
[javac] import com.android.vending.billing.IMarketBillingService;
[javac] ^



Any help or idea ?

Thanks

Seth
08-01-2012, 08:37 PM
Hmm, anyone else this problem? Basically every single Android SDK update something like this happens, so I suspect it's the Android Tools 20 update that is the culprit.

I've got some releases to handle today but I'll update my stuff later and see if I have the same problems.

My current Android setup is:

Android SDK Tools 19
NDK: r8
Ant: 1.8.3

Seth
08-04-2012, 02:16 AM
Update: It looks like they moved the library paths in SDK tools r20, and NDK r8b has some compiler issues as well (apparently, they have some bugs in it, expecting an r8c soon...?)

So I'd stick with platform tools 19 and NDK r8 for now if possible.

One thing I've learned about Android, always backup your "tools" and "platform-tools" directories in the android SDK before updating, because the update deletes the old ones and don't offer a way to get them back after upgrading (?), which invariably breaks something.

gerro
08-06-2012, 02:12 PM
Could you provide a link to download the sdk-19 and ndk-r8 ?

Thanks

Seth
08-08-2012, 05:48 AM
I don't think Google has downloads for older versions. Yeah, sucks. :mad: I mean, if you're going to break everything with a new version, they should at least keep the old versions around for download.

I plan to update the examples when they hit NDK 8c (?), fixing a few bugs that are in 8b.

darkchazz
08-08-2012, 01:34 PM
older downloads are actually available, but they don't provide a link though :sweatdrop:

Just take the link for the latest version, e.g ndk r8b: http://dl.google.com/android/ndk/android-ndk-r8b-windows.zip
and change the version number and it will download.

Same can be done for the sdk, but r19 though is only available through the Android SDK Manager.

ccthien
08-12-2012, 03:58 AM
on build.xml do change this:
...
<aapt executable="${aapt}"
command="package"
versioncode="${version.code}"
versionname="${version.name}"
debug="${build.is.packaging.debug}"
manifest="AndroidManifest.xml"
assets="${asset.absolute.dir}"
androidjar="${project.target.android.jar}"
apkfolder="${out.absolute.dir}"
nocrunch="${build.packaging.nocrunch}"
resourcefilename="${resource.package.file.name}"
resourcefilter="${aapt.resource.filter}"
libraryResFolderPathRefid="project.libraries.res"
libraryPackagesRefid="project.libraries.package"
previousBuildType="${build.last.target}"
buildType="${build.target}">
<res path="${out.res.absolute.dir}" />
<res path="${resource.absolute.dir}" />
<!-- <nocompress /> forces no compression on any files in assets or res/raw -->
<!-- <nocompress extension="xml" /> forces no compression on specific file extensions in assets and res/raw -->

<nocompress extension="rtfont" />
<nocompress extension="rttex" />
<nocompress extension="wav" />
</aapt>
...
<javac encoding="${java.encoding}"
source="${java.source}" target="${java.target}"
debug="true" extdirs=""
destdir="${out.classes.absolute.dir}"
verbose="${verbose}"
classpath="${extensible.classpath}"
bootclasspathref="project.target.class.path"
classpathref="project.javac.classpath"
>

...

=============================
Example patch for RT3DApp:

Index: RT3DApp/android/build.xml
================================================== =================
--- RT3DApp/android/build.xml (revision 1032)
+++ RT3DApp/android/build.xml (working copy)
@@ -101,13 +101,13 @@
debug="${build.is.packaging.debug}"
manifest="AndroidManifest.xml"
assets="${asset.absolute.dir}"
- androidjar="${android.jar}"
+ androidjar="${project.target.android.jar}"
apkfolder="${out.absolute.dir}"
nocrunch="${build.packaging.nocrunch}"
resourcefilename="${resource.package.file.name}"
resourcefilter="${aapt.resource.filter}"
- projectLibrariesResName="project.libraries.res"
- projectLibrariesPackageName="project.libraries.package"
+ libraryResFolderPathRefid="project.libraries.res"
+ libraryPackagesRefid="project.libraries.package"
previousBuildType="${build.last.target}"
buildType="${build.target}">
<res path="${out.res.absolute.dir}" />
@@ -139,14 +139,19 @@
else="${jar.libs.dir}">
<isset property="tested.project.absolute.dir" />
</condition>
- <javac encoding="${java.encoding}"
+ <path id="project.javac.classpath">
+ <path refid="project.all.jars.path" />
+ <path refid="tested.project.classpath" />
+ </path>
+ <javac encoding="${java.encoding}"
source="${java.source}" target="${java.target}"
debug="true" extdirs=""
destdir="${out.classes.absolute.dir}"
- bootclasspathref="android.target.classpath"
verbose="${verbose}"
classpath="${extensible.classpath}"
- classpathref="project.libraries.jars">
+ bootclasspathref="project.target.class.path"
+ classpathref="project.javac.classpath"
+ >
<src path="${source.absolute.dir}" />
<!-- <src path="../../shared/android/src" /> -->
<src path="${gen.absolute.dir}" />

youngvleo
10-07-2012, 01:39 PM
Got the same issue just now, have resolved by downgrade SDK tools to r19 and ndk to r8

Way to downgrade sdk to r19

1.Find your Android SDK folder
2.Locate the "tools" subfolder and rename it to "tools1" (just to keep a backup copy of the original tools folder)
3.Download from google repository the SDK Tool version you want to downgrade to (in this case it was: http://dl-ssl.google.com/android/repository/tools_r10-windows.zip) and unpack it.
4.The ZIP file you downloaded contains a tools folder that has to be moved to your Android SDK folder.

Have fun!

darkchazz
10-11-2012, 10:08 AM
^ ccthien's fix works fine... so why downgrade :rolleyes:

karelc
01-29-2013, 03:46 PM
I can't get past this. Fixing build.xml as described here does not work. Downgrading to ndk r8 and tools 19 does not work either.

BUILD FAILED
C:\proton6\RT3DApp\android\build.xml:12: Source resource does not exist: C:\proton6\RT3DApp\android\local.properties

This is all I get. Worst of all is I can't get my backups to work either.. I thought I had everything but I am confused about platform-tools, I did not have backups of that folder and when I downloaded older sdks they did not include that folder either.
Anyway it should be easier to just use the new stuff and in the end that's what I want to use. I just can't seem to fix it.

Seth
01-30-2013, 04:04 AM
I can't get past this. Fixing build.xml as described here does not work. Downgrading to ndk r8 and tools 19 does not work either.

BUILD FAILED
C:\proton6\RT3DApp\android\build.xml:12: Source resource does not exist: C:\proton6\RT3DApp\android\local.properties

This is all I get. Worst of all is I can't get my backups to work either.. I thought I had everything but I am confused about platform-tools, I did not have backups of that folder and when I downloaded older sdks they did not include that folder either.
Anyway it should be easier to just use the new stuff and in the end that's what I want to use. I just can't seem to fix it.

Hmm, is your local.properties files missing?

Make sure app_info_setup.bat has this in it (and that it's being run when you do build.bat) :

call android update project -p ./

I think that's make it if it is missing.

karelc
01-30-2013, 10:27 AM
app_info_setup.bat has that line, and it is called from build_prepare.bat, which has that line again right after. local.properties remains missing.
In another thread someone posted the same error, your reply there said it was the same error as in this thread. On second thought it doesn't look like it..
http://www.rtsoft.com/forums/showthread.php?6008-Need-help-on-windows-android-compile
That same line is highlighted in red there, I don't know how to fix it though. As far as I can tell a target is set, I did not touch any of this in RT3DApp. I'm just trying to compile it unaltered from svn (except to try everything both with and without the build.xml changes).

karelc
01-30-2013, 11:19 AM
I posted a reply but it didn't appear in the thread? Sorry if this is a double post.

All calls are present, they are as I got them from svn.

This thread shows the same problem, I only posted here because you said there it was the same problem.. now I'm not so sure.
http://www.rtsoft.com/forums/showthread.php?6008-Need-help-on-windows-android-compile
It complains there is no target but as far as I can tell the target is set in all the places it usually is, and again I didn't change anything in RT3DApp so I don't know what could be going wrong.
It must be in my setup but I redid the whole thing, ndk (tried with r8d, r8, even r6), sdk (with tools 20, 19, 15..), ant (1.8.4, that version is mentioned in your guide so must be good), adding to path... I can't think of anything else to do.

Seth
01-30-2013, 11:50 AM
Hmm, strange. I wish I had time to switch everything over to the latest Android stuff, but I'm neck deep in releases every week so it's a bad time for me..

But, I have a strong suspicion that your either your tools folder, or your platform-tools (yep, two to worry about) are not r19.

Because I don't trust the SDK Manager, I've put them up here as zips, you should rename your old tools and platform-tools and try these:

http://www.rtsoft.com/temp2/android-sdk-platform-tools_r19.zip (10 mb)
http://www.rtsoft.com/temp2/android-sdk-tools_r19.zip (37 mb)

Hopefully will suffice until proton's build scripts support the latest stuff, if that is indeed the problem!

karelc
01-30-2013, 12:38 PM
That doesn't help and it doesn't surprise me either, I don't think the problem is there.

I am however surprised that I never tried to call android update myself. I just did (android update project --target 9 --path ...), this does add local.properties and I can compile.
So I don't know why it won't do the update from the .bat but I remember that local.properties used to be included so I suppose that explains why I didn't have a problem before.

Seth
01-30-2013, 12:59 PM
That doesn't help and it doesn't surprise me either, I don't think the problem is there.

I am however surprised that I never tried to call android update myself. I just did (android update project --target 9 --path ...), this does add local.properties and I can compile.
So I don't know why it won't do the update from the .bat but I remember that local.properties used to be included so I suppose that explains why I didn't have a problem before.

Hmm, I have this vague memory of someone else having the same issue.. sounds like if I change the current update project -p ./ to android update project --target 9 --path it will fix it for everybody. Thanks for posting your solution.

karelc
01-30-2013, 01:30 PM
Actually the target is wrong, the number you give there does not correspond to the actual target you want.
eg --target 9 like I did turns into "Intel Corporation:Intel Atom x86 System Image:10"!
Use 'android list targets' to figure out the proper one, there's a bunch of weird ones. I think you want --target 7 which is 2.3.3 but it becomes android-10, not 9. I don't see a 9 anywhere..
And I like to target 4.0.3 (because I also use android activities) which is --target 14 but turns into android-15.. Jeez Google! :)
Also this does not update the target in the manifest, but it doesn't seem to matter. Man what is this.. lol


Lastly, with that done I moved to the latest stuff but tools is now at 21 and it breaks again. A quick google search shows you need to add libraryRFileRefid="project.library.bin.r.file.path" on top of the other changes ccthien posted to get it to work.

Seth
06-19-2013, 08:47 AM
Quick update: Proton has been updated to work with the latest android tools, using the info from this thread. Thanks guys.