not compatible with Android SDK Tools 14 #79

Closed
francisdb opened this Issue Oct 19, 2011 · 13 comments

Projects

None yet

6 participants

@francisdb

There is a new build.xml file that does not recognize the library and maps as libraries

More info here
http://tools.android.com/recent/buildchangesinrevision14

Workarounds are welcome (renaming default.properties to project.properties in not enough)

@fjjimenez01

According to the docs:

"...To fix all of these issues, we have decided to move to library projects generating a jar file that is directly used by other projects..."

http://tools.android.com/recent/buildchangesinrevision14

According to the FAQ of ABS:

Why is ActionBarSherlock a library project whereas the original compatibility library is only a .jar?

ActionBarWatson, the custom action bar implementation within ActionBarSherlock for pre-3.0 devices, relies on styles, themes, layouts, and drawables in order to display properly. Due to the limitations of Android and .jar files, it can not be accomplished any other way.

So, like you, Im wainting for a fix, announcement, anything.

@iNoles
iNoles commented Oct 19, 2011

You have to do

android update lib-project
--target <target_ID>
--path path/to/your/project

inside of library directory

@fjjimenez01

It works, thank you

@JakeWharton
Owner

There will be a new release tonight or tomorrow that changes over to ADT14 style. Thanks for providing quick support @iNoles.

@francisdb

Great, big thanks in advance

@JakeWharton
Owner

To fix ADT problems:

  1. Open your project properties (Right click > Properties).
  2. Under "Android" remove the ActionBarSherlock library reference. Click "Apply".
  3. Under "Java Build Path" remove the ActionBarSherlock src folder reference (usually ActionBarSherlock_src).
  4. Click "Ok" to close the properties and apply your changes.

Your project should change from having a ! icon to just the red x.

  1. Open your project properties (Right click > Properties).
  2. Under "Android" add a library reference to the ActionBarSherlock library.
  3. Click "Apply" and then "Ok".
  4. Enjoy a cup of tea. You're done.

You can also never perform close/reopens and cleans of your project too many times. Use it like it's going out of style.

If you're only using ant or maven you will need to update the library to 3.3.1+.

@francisdb

So how do I get his 3.3.1 project working in eclipse?

@frapontillo

I have added ActionBarSherlock as a project reference to ViewPagerIndicator and they both compile and generate a jar file. But when I add both library references in my Android application, it says "Build success" and generates an empty apk. Will the ViewPagerIndicator update solve this issue?

@JakeWharton
Owner

@francisdb Delete your current ActionBarSherlock project in eclipse as well as the folder on your hard drive and start from scratch. Download 3.3.1, extract it, and go through the process of creating a new project from existing sources. Once you have that done in eclipse with no errors on the library you can move on to the steps listed above for updating your project's reference to the library.

@frapontillo I'm not sure what's causing empty APKs. Are you sure you've updated both the Eclipse plugin and ADT to version 14? Perhaps try destroying the projects and creating new ones as I mentioned at the top of this post.

You also don't need to put a reference to ActionBarSherlock on the ViewPagerIndicator project. It compiles directly against the compatibility library itself which is included in its libs/ folder.

@frapontillo

Ok, this is a very strange issue NOT related to your libraries. As it comes out, any Android project won't compile. Even if I start a new one, with the classic activity that inflates a layout.
Apparently, updating to ADT must have messed something in Eclipse or whatever. I'm going to report back asap.
Thank you.

@francisdb

I had to remove Eclipse android tools and re-install it to fix my issues. Somehow the upgrade must have broke some things. Thanks for the pointers Jake.

@zachlipton
Contributor

I've fixed certain weird issues using ABS as a library project in eclipse by quitting eclipse and relaunching with the -clean option (on OS X, you can do this by running /Applications/eclipse/eclipse -clean from the terminal), doing a Build->Clean on both your project and the ABS project, and rebuilding. It seems the eclipse internal caches can get confused somehow, resulting in strange behavior with resources.

@frapontillo

Ok, this is how I solved it (thanking http://stackoverflow.com/questions/4714711/android-packaging-problem-resources-ap-does-not-exist/7824904#7824904):

  • Reinstall of Android SDK
  • Reinstall of Eclipse
  • Reinstall of the ADT plugin
  • Deletion of the workspace .metadata folder

The last step was the thing that made my projects work again. After all, I think that the first three steps were not necessary. If you have the same problems I had (empty apk), just delete the .metadata folder. You will lose all of Eclipse settings (not the installed plugins, though) and you will have to re-import your projects in Eclipse.
I hope this is going to help somebody else avoid spending three days on the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment