Could not find class 'com.google.gdata.client.calendar.CalendarService' - android

I am trying to use CalenderService from this class but it is giving me " Could not find class 'com.google.gdata.client.calendar.CalendarService' " error at runtime, i have imported gdata.client libraries. Have tested on both android versions 2.0 and 4.0, but still getting this error.
Any suggestions?
thanks

I guess you need to add support library so to do that, just Right click on your project from Project Explorer goto Android Tools -> Add Support Library.
And clean your project after adding the libraries.

It sounds like you might not be exporting the library. In the Project Properties window, Java Build Path section - make sure the library is checked on the Order / Export tab.

Related

NoClassDefFound Error in android after updating the SDK

I was using ADT with Eclipse 22.3 version where my code was working fine but as soon as I started using the latest version 22.6 (to implement few functions which could not be done in 22.3) i got this error. I tried out stuff like restart eclipse,clean project,build pathh also created libs folder and copied all jars in it.The class for which i am getting this error is a third party (AmazonS3Client).I have included all jars correctly checked them in referenced libraries.It was working well in earlier version but not here.please someone help
Go to Project -> Properties -> Java Build Path -> Order & Export and ensure Android Private Libraries are checked for your project and for all other library projects you are using. Clean all projects and run it.
You need to go to Go to Project->Properties and make some changes as per the answer.
Check the answer here

SherlockActivity cannot be resolved to a type when update the latest sherlock library in android?

when I use sherlock library 4.2.0.0 in my android apps my apps working fine and update the sherlock library with 4.4.0.0 then my apps working fine but when upgrade eclipse and android sdk then got error "SherlockActivity cannot be resolved to a type" and other classes and methods of sherlock giving a same error "--- cannot be resolved to a type" .
When i upgrade my eclipse i saw some changes in folder structure and showing error under
"Android Private Libraries" folder like "missing" something.
some people suggest me delete the android-support-v4.jar from libs because this already present in "Android Private Libraries" then i deleted. when the build the all android projects then I got error "error while execute aapt.exe" on popup . I don't know why this
happen.
Que.1 is there any file missing while i am updating eclipse.
I did add library like a,
create new android project -> make it library without creating activity -> after that ->
import the sherlock library into that project.
and add this library to the my android apps
project properties -> add sherlock libary
I am also upgrade eclipse and sdk. I tried lot of way to add the sherlock library but not added yet. please suggest me some solution because i want to deploy my apps.
I had a problem with Sherlock and it was Compiler compliance setting that I had to set to 1.6.
Try with Right click on you project -> Properties -> Java Compiler -> Compiler compliance level and set 1.6

SmartWatch sample installation

I would like to compile the sample provided by Sony for his SmartWatch. I followed the instructions in this page. But when I added the the SmartExtensionUtils project I saw lot of errors like: com.sonyericsson.extras.liveware.aef cannot be resolved to a variable. Instead this import com.sonyericsson.extras.liveware has no problem.
Did someone find and solve this issue?
In order for the EightPuzzleGame to compile, you need to add the following library projects that are available in the SDK:
SmartExtensionAPI
SmartExtensionUtils
SmartExtensionInternalUtils
In your case, it is the API project that is probably missing. You can see what library projects that are missing by checking the project properties. Example:
What you need to do is go to the properties page of the SmartExtensionUtils library and in the library box add SmartExtensionAPI as a dependency
This is a link to my desktop screenshot. SmartExtensionAPI and utils are in the project list (left side) but the EightPuzzleExtension does not find them
You don't need SmartExtensionInternalUtils project. When you create project from existing source, check Import project into Workspace. In this way EightPuzzle, SEAPI and SEUtils will be in the same directory and you'll not have no errors :)
I had this problem too. What i did is to solve it, is to import from the Sony samples in the Sony add-on SDK 3.0 the SmartExtensionAPI first and than SmartExtensionUtils. If these samples are build correctly the other samples will build correctly as well.
Go to File|Import, choose SmartExtensionAPI as your root directory and click finish. Maybe you have to change the compiler compliance level to build it correctly. After this do the same for SmartExtensionUtils.

Android Library Dependencies broken after SDK/ADT-Update

Today, I updated my Android SDK and Eciple ADT to the most recent versions (ADT Rev 22). After restarting Eclipse it is quite unhappy with the Build Paths whenever I reference custom libraries.
An example is shown in this screenshot:
My custom "Android Utilities Library" compiles fine, but everything that depends on it shows build path errors. E.g. when I investigate the build path settings for "Android URA Library" it shows me an error with the android_utilities_library.jar missing under "Android Dependencies" (which in fact is true, the libraries will be built to individual class files in bin/classes).
After reading the solution to Build path errors with library projects I tried to clean and manually build my projects in the correct order, but to no avail.
I've never dealt with this before, so I don't know how to attack the problem.
Any help is appreciated. Thx!
Installing the new Build Tools did the trick. They were not automatically included when I updated the SDK (probably need to run the update twice I guess).
I found a solution that works for me:
Go to Project Properties > Build Path > Order and Export
Then you have to check each checkbox.
In my case my libraries were restored
I hope it will help.
I can see that your project Android URA Library is referring to Android Utilities Library, then the problem should not relate to SDK/ADT update.
Please check:
Project Properties of Android URA Library, choose Project tab and make sure you added Android Utilities Library as dependency project. Otherwise, please add it.
If the problem is still existing, then Projects \ Clean All Projects
Go to libraries and check the build path of the dependent libraries. It should be same as your projects build path.
if you have import all the Dependencies in your workSpace.maybe you can:projetc-->build all.
I meet the problem,and it works well

Can not include source library in project in Intellij IDEA

I've created library project in IDEA with common helpers, which I use in my android applications.
Then I've created android application and included in it my library project like this tutorial said.
Everything seemed okay, code autocomplete worked fine, IDEA recognize that library and all classes and methods in it.
But then I compiled application and saw error "'org.my.helperlibrary' does not exist". However as I said IDEA acts like everything okay before making/launching project.
Here is similar question, but answer is trivial, of course my library has checked "Is Library Project" option but I still can not launch my application which use my library.
Updated:
I've just saw an error: "UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Lorg/my/helperlibrary/Helper;" when I removed all usages of library in my android application. So it's just included in my app and not used.
It turned out that I should not add dependency manually in that window
I rather should add new module in my Project window at the left
Then I should choose iml file in the root folder of android library project I want to use
Then I pressed finish and from that point I had two modules in my project
After that when using classes I can press Alt+Enter on any class from SampleLibrary and tell IDEA to add module dependency
Then I could see that IDEA made all I need without me. I can now use SampleLibrary from SampleApplication!
Try to select library project, then click Build -> Compile <your library project name>.
Then back to you project which use this library and click Build -> Rebuild Project.
After that try to run project again.
Hope it helps.

Categories

Resources