Reputation: 4120
I'm setting up an Android-based Amazon AWS SimpleDB client in Eclipse (just started). I'm getting an error on the line:
import com.amazonaws.services.simpledb.AmazonSimpleDBClient;
that says "The import com.amazonaws cannot be resolved."
I've already installed the AWS SimpleDB jar file in the lib directory of my project, and added the lib directory to the build path of my project.
How do I get Eclipse to resolve the name in the import statement? Thanks.
Upvotes: 3
Views: 30773
Reputation: 1042
I fixed it by Installing AWS toolkit for eclipse using below steps :
Install the Toolkit in Eclipse
1. Open 'Help' from Eclipse menu bar → Install New Software….
2. Enter https://aws.amazon.com/eclipse in the text box labeled “Work with” at the top of the dialog.
3. Select the required "AWS Core Management Tools" and other optional items from the list below.
4. Click “Next.” Eclipse guides you through the remaining installation steps.
After installation , Clean and rebuild the project and then restart Eclipse.
Upvotes: 0
Reputation: 81
I had same error today. import com.amazonaws would not resolve in Eclipse.
I resolved the issue by re-creating my project in Eclipse File -> New -> Other -> AWS Java Project
I had already installed the AWS software developer kit in Eclipse.
Upvotes: 2
Reputation: 2030
You can try to remove that jar from the build path and rename the "lib" directory to "libs". The jar files from the "libs" directory will be added automatically to the build path.
For me the jars from the "lib" directory were not included in the apk. In the eclipse there was no problem. Only after I installed the project on a device.
Upvotes: 1
Reputation: 4120
I found the answer to my problem. I think I made an error when adding the lib directory to my build path.
Here's the right way to do it:
Right click Project -> select Properties -> Java Build Path -> Libraries and click Add JARs. Then select the JARs added to the lib directory. Thanks.
Upvotes: 4