I have basically just downloaded the newest android and eclipse bundle from Google, and upgraded the sdks to the newest versions. As well as installed the adt plugin.
Well... now all content of any library projects wont get recognized.
They are included fine as Libraries, but I get a red x whenever a class tries to reference anything from a library project. (Edit: the problem is that any library reference cannot be resolved.)
Nothing works. Cleaning, restructuring, restarting. The jars from the Library projects aren't being included in the bin folders anymore, and I can understand that that is from the new build system upgrade. But this also break everything!
Has anyone had a similar problem, and hopefully a solution?
(I am also running Windows 7 64 bit)
whatever library project you are using should have common support v4 jar file in lib folder,
so get the updated support v4 libary and replace all old v4 libary with that updated one.
still getting a error then post your logcat log
Related
Has anyone managed to make adt + gradle work together on his android apps? I wrote my build.gradle file using gradle plugin by spring and it builds just fine. However the adt thinks that there are no local libs attached to the project (appcompat) so it hits error at my resource files.
So my question is how to fully intergrade a gradle build with adt? Or should I ask how to fool eclipse ADT into thinking that all local libs are there without actually adding the lib projects to workspace?
I don't wanna use Intellij or Android Studio. I tried them but they are confusing and complicated to me. I wanna use eclipse for everything.
OK Eclipse dudes just told me that this will be available soon via a project called Andmore. they will handle and continue the developing of adt now that google has dropped support on it.
This is still a work in progress but they expect to start bootstrapping the project soon.
I updated the SDK Tools to R22 and the ADT Plugin as well. Everything worked well before the update but since then, I have problems.
Basically I have 2 library projects and an app project. One of my library projects contains some jar files in the "libs" folder. One of these jars is used in the app project itself for some initial setup. Before the update, everything worked fine, but now it asks me to add the jar to the build path and even if I do so, when running the app it still gives me ClassNotFoundException.
Did anyone had some similar experience or has any idea about what causes this and how can it be fixed?
Thanks.
Check this Android Sdk tools Revision 22 issue?. "I found that I needed to check all of the boxes in the order/export tab of the Java Build Path for the project - and each library -- to properly compile and run the app on a device." - should helps.
The workaround here worked for me
OK. I also had a Simillar kind of Problem.
Like say If you have library project as google-play-services_lib before updating than might happen that your library code has been also updated after updating your SDK.
You Should Remove that library project from your Workspace and Import
again from the source
folder like in my case i had to import from /android-sdk-linux/extras/google/google_play_services/libproject/google-play-services_lib. Add reference of
your library path to you android app project. clean and build your Project.
Hope this Helps.
you should try to upgrade eclipse.
1) Get the new imports via the Android SDK Manager
2) Check for updates in the Eclipse repository: help/check for updates
That would "for real" upgrade the SDK version in your configs.
Dunno if the other steps pointed by VShcryabets are needed, i had them before.
I'm trying to use BoofCV and I have the JAR in my /libs folder, with the rest of the JARs my app uses (and they work correctly) but it keeps giving me this error
04-26 15:53:12.110: E/AndroidRuntime(29683): java.lang.NoClassDefFoundError: boofcv.struct.geo.AssociatedPair
Even though I can go over to the jar file, navigate to that location and see AssociatedPair.class where it should be.
The jar is in my build path with the others so I don't understand why I'm getting this
As you already mentioned, this is a JDK 1.7 issue. Take a look at the comments section for this article on codeproject, it discusses this very issue:
http://www.codeproject.com/Articles/553637/Real-Time-Computer-Vision-on-Android-using-BoofCV
I have been able to get JDK 1.7 code to work in android using IntelliJ. The other option that worked for me was to recompile every library with JDK 1.6. There might also be a way to get eclipse to work using JDK 1.7 since there is a known fix, but as of a month or two ago it hadn't been incorporated into eclipse.
The latest version of BoofCV v0.14 should be compiled in JDK 1.6 and not JDK 1.7. If you have an older version try upgrading.
I have implemented the new Facebook SDK 3.0 beta. The library project contains the Android support library v4. I also have the support library on my own proyect (a different version though). When I add the Facebook SDK as a library I get the next error on the console:
Jar mismatch! Fix your dependencies
Found 2 versions of android-support-v4.jar in the dependency list,
but not all the versions are identical (check is based on SHA-1 only at this time).
All versions of the libraries must be the same at this time.
I've tried to exclude the libs folder on the buildpath, but the error remains.
I have to put the same .jar in both places. Am I missing something here? The idea is to use the support library of my own project (to keep it updated).
It seems like the different projects are using two separate support libraries and therefore the checksum is different.
You must repeat this for both the Facebook SDK project and the app you are building.
What I do when I get this error is:
Right click the project.
Hover over Android Tools.
Click on "Add support library..."
Accept the downloading of the library.
This insures two things: a. you get the newest version of the support library from the Google sources, and b. you have the EXACT same library in all your projects.
Happy coding!
Simply delete the one in your project, remove it from the class path and try rebuild your project.
Installing the same version of support libraries via menus mentioned in the top answer is quite a good solution.
Although this sometimes didn't work for me (I think it has something to do with my Workspace folder being synced with Dropbox, so Eclipse won't overwrite files sometimes) so the approach I am using is to link the support library from the central place.
There are these JAR files inside your SDK folder (C:\Program Files (x86)\Android\android-sdk\extras\android\ on Windows for example) which is being updated when you run SDK manager, so you could just reference that one from both the Facebook (or any other library) and your projects. Since in the end, code from JAR files gets packed to your classes.dex. You don't even need the support library in the libs folder.
Also: If you use the Gradle build system and its dependency management or even Maven you will not have problems like these, but they require more time and knowledge to set-up correctly.
I have several Android Projects marked as "Library Projects". I also have several Projects which use them, obviously.
The problem is, sometimes if I restart eclipse, all those Classes used from Library Projects are marked as "Not Found" and I can't quickfix that (using imports, etc.)
The only way I can fix it is right-click the project which includes library projects, remove all library projects, apply, then add them again. That is REALLY annoying, and I'd like to fix this permanently.
The Projects are using Android Library Projects and are not Library projects themselves. Eclipse Version: 3.7.1 Build id: M20110909-1335
Try upgrading your Eclipse ADT plugin to the 15.0.1 release that shipped earlier this week. After one last fixup using the steps you outlined above, I haven't had a recurrence of this problem.