Thursday, March 22, 2012

Problem with SDK tools r17

There is a small problem with latest version of Android SDK tools revision 17. It will not bother you if your project doesn't use any JAR dependencies. As reported in our JIRA the output of our build misses classes from JAR libraries that are contained in libs folder of your project. Note the content of JAR referenced by library projects is included correctly.

I initiated some discussion on ADT-dev mailing list to see if there is a chance to fix this problem and will look for some solution. Meanwhile there is a workaround to set the working directory for your IDE to your project directory (simply start it from this directory). Or more complex one can be to create an Android Library project and move these JAR there.


7 comments:

  1. What does "set the working directory for your IDE to your project directory (simply start it from this directory)" exactly mean? How to do it?

    Thanks

    ReplyDelete
  2. Start the IDE from command line from your project directory. Or customize the launching shortcut. There should be an option specifying working directory.

    ReplyDelete
  3. If I start from command line works fine for me, thanks.
    But I have problems publishing to Market because everything went well but when I tried to install it from market to check, a dialog said that the app is not well signed!! Be carefull.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Problem with external libraries still exists. After build and install from nbandroid application doesn't work. But when I build and install from terminal (ubuntu 11.4, in root project director I put ant debug, ant installd) everything is fine.

    ReplyDelete
  6. Hi there,

    I was using a custom location for my JAR libraries and had this problem.

    I updated to Android SDK tools r19 (from r18) and the problem was still there.

    It didnt matter if I started Netbeans in the folder of the project and also didnt matter if I changed "custom location" to a an absolute path to the JAR files.

    Solution was to copy the JAR files to libs/ inside the project and select "Default location (libs folder in your project)". Then it works, no matter from which directory I start Netbeans).

    Thanks for the good work, Radim!

    ReplyDelete
  7. Unfortunately, all of these workaround doesn't work for me. I tried to start Netbeans from command line from my project directory, in project properties I selected "Default location (libs folder in your project")", and build and deploy from command line not works too. Any suggestions?
    SDK Tools is r19

    ReplyDelete