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.
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.
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.
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.
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.
Clean Project was the solution for me.
Related
I just recently upgraded to the newest version of Android Studio (0.1.1), but I also used Android Studio to relocate my project to my Dropbox folder. So, I'm not exactly sure which one is causing this problem. When I build or try to run my project I get this error:
Cannot start compilation: the output path is not specified for modules
"actionbarsherlock",
"EmPubLite-EmPubLite".
Specify the output path in Configure Project.
I can't find any reference to "Configure Project" and the Project Structure option under File no longer works in this release.
Solution for Android Studio version < 1.0 :
You just have to go to your Modules settings > Project and specify a "Project compiler output"
and make your modules inherit from project. (For that go to Modules > Paths > Inherit project.
Or you can specify your output for each module if you want.
In order to do so you just need to follow this steps:
Open Project structure (F4 on one of the modules in the project explorer)
Click on Project tab on the left
Define "Project compiler output:" as YOUR_PROJECT_PATH\out (or any folder you want)
Click on Modules tab on the left
Go over all your modules and verify that under the Paths tab the Compiler output is set to "Inherit project compile output path"
I ended up re-importing the project using Gradle and it's back to normal. Very weird issue.
this is a problem that I face in case I open my phonegap project with Android Studio and Webstorm.
They are IntelliJ-based project and I guess they are both writing the files in .idea
Reimporting the project is the solution.
got same error while using studio feature to import from GitHub repository.
I deleted the whole project and .. cloned it using git terminal and imported as new project ... studio prompted to add VCS root, accepted ....everything was fine afterwards. As #lordhong prompted.
I found this:
http://www.chrisdew.com/blog/2013/07/17/android-studio-nosuchmethoderror-lazystringarraylist/
it is realy help for me.
Thus, in my case, the problem was to have two libraries:
protobuf-2.4.1.jar
and new protobuf-2.5.0.jar
it resulted error:
APK path is not specified for module “Example-Example”
To correct this, rename file protobuf-2.4.1.jar to protobuf-2.4.1.jar.disabled
mv protobuf-2.4.1.jar protobuf-2.4.1.jar.disabled
How I finally managed to fix after hours!
File -> Project Structure -> Facets -> choose module's facet -> Packaging. Enter in APK Path absolute path to apk to be created: C:\workspace\MyCompany\MyProject\myProject.apk
Press ok and run your project
When I create a new android project in Eclipse, and I choose to have a default main activity, my R.java file does not get generated.
I have seen some questions online and on this site about R.java not being generated but all are due to some manual action/mistake that had to be corrected during the development of the application.
However, does anyone know why R.java would not get generated for a brand new android project, where I have made no manual modifications whatsoever?
I think your problem is just the latest update of the SDK.
Test the following operations on two projects :
In the project properties (eclipse) -> java build path -> order and export make sure that all your jars in the libs folder are checked.
And "Android Tools -> Fix Project Properties"
And "Project -> Clean"
I hope you have helped!
ADT version 22 requires that you install "build tools". To get it to work i had to update:
SDK Tools
Platform Tools
Then install:
Build Tools
This link recommends you add build tools to your environment path. I had to do the following before the R.java was generated:
Append build tools to PATH environment variable
Restart Eclipse.
Make sure your project is free of errors and problems. You can use Windows-View to find and rectify them. Common mistakes are in the layout files.
Check the AndroidManifest file and see if the activity names match the classes in your source folder. Clean and rebuild.
R.java creates every time when you create android project first time r.java created by default
so check for the errors and clean the project.
I'm having trouble trying to import a project. After doing so I get 6 error items. Of which 4 are the same (Unable to resolve target 'Android-8').
Another one is: Project 'MyProject' is missing required Java project: 'org.json'.
Even though the file org.json.jar is in the libs folder.
And the last one is: The project cannot be built until build path errors are resolved.
What can I do to make Eclipse properly import my projects?
I even tries to create a new project and manually copie the files, but didn't turn out as expected.
To import the existing project
Project Explorer-->new Android Project from Existing Resource-->select project and check copy to the work space option(if you need)--> finish.
Problem
Unable to resolve target 'Android-8'
Right click on the project-->android-->select the target as 8 and save.
org.json.jar
Download this jar from the internet and paste the jar file in the lib folder.
3.Clean the projec once
Unable to resolve target 'Android-8'
You dont have Android-8 SDK installed on your pc.Concider downloading this SDK or if you have any SDK above this version just select it. under project properties.
Project 'MyProject' is missing required Java project: 'org.json'
This message suggest you that this project is expecting org.json library project in your workspace and you should include it as library project.
If you have got jar file then its fine,under project properties just remove library project dependancies and include jar file in build path.
How have you installed the ADT?
It's possible that if Android options aren't available, you haven't installed the ADT plugin correctly.
I would do the following:
Ensure that the ADT is installed
Delete the project and re-import it under the option "Import existing Android code into workspace"
Check that the build path options are correct. Android projects add jars in the lib folder to projects automatically, but this is worth checking.
Keep us posted!
I have import google-play-services_lib into my workspace and Add google project into MYProject it give mr error:
Description Resource Path Location Type
The container 'Android Dependencies' references non existing library 'D:\Android
Workspace\google-play-services_lib\bin\google-play-services_lib.jar' HBuddy Build
path Build Path Problem
Description Resource Path Location Type The project cannot be built
until build path errors are resolved HBuddy Unknown Java Problem
and I have already installed Google Play Service in Extras
I met this issue as well.
My solution is,
clean project google-play-services_lib firstly
then clean my project which depends on play service library
Hey i know what your problem is. I think it seems like you didn't built your google-play-services project... Try the following solution:
Import the google-play-services_lib "project" into your workspace
Add the freshly imported project to your applications build path
RIGHT-CLICK the google-play-services_lib project and select "Build Project"
Wait a few moments or "clean up" your project
Run your application and - Voila -
Please uncheck "Is Library" as follows ;
Your bin folder doesn't exist! You probably don't have permission to create a folder.
If you create a project from existing code make sure you check "Copy projects into workspace".
I found that the reference is looking at the wrong folder. It normally looks in <android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/bin/ for the jar file and the file is actually inside the <android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/libs folder. I couldn't find a way to change the reference link, so I just copied the jar file and the matching jar properties file from the /libs folder to the /bin folder.
I hope it helps.
My solution is,
clean project google-play-services_lib firstly
then clean my project which depends on play service library
There is another way to resolve this issue. Import google_play_services_lib project to your work space.
android-sdk/extras/google/google_play_services/libproject/google-play-services_lib
Then add the google-play-services.jar file externally.
right click on your_project -> properties ->java build path -> Libraries -> add External JARs -> select google-play-services.jar from work space ->clean ->build
It works for me.
I was facing the same issue and got it solved when I updated my eclipse Android SDK tools.
I was using version 22 and when I updated Android SDK tools to 22.0.1 the error vanished and I could build my project.
I hope this helps someone...
Check Read Only property of the Project folder.
If its checked, uncheck it and then try.
I imported a project. I see import errors in each file. In the problems view I have the following errors:
Project X is missing the required source folder 'Gen'
The project can't be built until the build path errors are resolved
Unable to resolve target 'android-10'
In my package Explorer view, I don't see the gen folder so that I could tweak it.
What should I do, i am new to android.
check whether you have android-10 version installed.
Clean the application
Right click on project -> select Android tools -> Fix project properties
Re build the application.
Try to delete the folder (if it exists) and do a Project Clean in Eclipse. Mostly this helps to recreate your gen folder.
You can try to recreate it manually and make it a source folder, too!
Make sure your project build target and API level you're using match.