Results 1 to 18 of 18

Thread: build.bat failed on Windows using ndk-r8b + sdk 20.0.1

  1. #1

    Default build.bat failed on Windows using ndk-r8b + sdk 20.0.1

    Hi, I use the latest version of ant, proton, sdk and ndk.
    After build.bat, I get this at the end :

    Code:
    -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 :

    Code:
    -compile:
        [javac] Compiling 13 source files to C:\protonsdk\RTBareBones\android\bin\classes
        [javac] C:\protonsdk\RTBareBones\android\temp_final_src\com\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

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,340

    Default

    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 A. Robinson
    Robinson Technologies

  3. #3
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,340

    Default

    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.
    Seth A. Robinson
    Robinson Technologies

  4. #4

    Default

    Could you provide a link to download the sdk-19 and ndk-r8 ?

    Thanks

  5. #5
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,340

    Default

    I don't think Google has downloads for older versions. Yeah, sucks. 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.
    Seth A. Robinson
    Robinson Technologies

  6. #6
    Lesser Knight
    Join Date
    Jul 2011
    Posts
    51

    Default

    older downloads are actually available, but they don't provide a link though

    Just take the link for the latest version, e.g ndk r8b: http://dl.google.com/android/ndk/and...8b-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.

  7. #7

    Default

    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.pac kage"
    + 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}" />

  8. #8

    Default

    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/rep...10-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!

  9. #9
    Lesser Knight
    Join Date
    Jul 2011
    Posts
    51

    Default

    ^ ccthien's fix works fine... so why downgrade

  10. #10

    Default

    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.

  11. #11
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,340

    Default

    Quote Originally Posted by karelc View Post
    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.
    Seth A. Robinson
    Robinson Technologies

  12. #12

    Default

    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/showthr...ndroid-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).

  13. #13

    Default

    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/showthr...ndroid-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.

  14. #14
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,340

    Default

    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-...-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!
    Seth A. Robinson
    Robinson Technologies

  15. #15

    Default

    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.

  16. #16
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,340

    Default

    Quote Originally Posted by karelc View Post
    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.
    Seth A. Robinson
    Robinson Technologies

  17. #17

    Default

    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.

  18. #18
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,340

    Default

    Quick update: Proton has been updated to work with the latest android tools, using the info from this thread. Thanks guys.
    Seth A. Robinson
    Robinson Technologies

Similar Threads

  1. Replies: 16
    Last Post: 05-24-2012, 06:35 AM
  2. About using xml files to build windows
    By Zenol in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 04-10-2012, 12:05 PM
  3. Android build failed
    By JonyMnemonic in forum Proton SDK
    Replies: 4
    Last Post: 09-25-2011, 11:22 PM
  4. Android build failed...
    By blackMasoon in forum Proton SDK
    Replies: 6
    Last Post: 07-27-2011, 08:07 AM
  5. Latest windows build corrupted?
    By whisperstorm in forum Novashell Game Creation System
    Replies: 1
    Last Post: 03-03-2007, 12:22 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •