Android eclipse ADT 'find references' bug - android

my setup:
Eclipse 3.6.2, ADT 15.0
android library project B
dependent android project A
With ADT 12 it was possible to use
-> right-click -> References -> Workspace
on a symbol of library B to find references of this symbol in the project A. This does not work anymore. Is there a workaround? Do you have the same issues? (Same applies to renaming, aso.)

I think checking your build path jars should solve the issue. If it doesn't try upgrading eclipse. I think that solved my problem.

Related

Android ADT build path issue, how to fix?

I installed android adt with eclipse and appcompat v7 is showing error I tried almost everything i.e
1.change the build path
2.re installing the whole package
3.include the jar files manually
4.Updating the eclipse
Please check for the error in picture.
Please help me its two days I am struggling.
You have installed the higher version of jdk. just follow the below steps.
right click on project properties > click on java compiler, enable project specific settings and change the java version to 1.4 or lower.
If anyone getting the same problem delete appcompat_v4 from the libs folder when creating a new project

Android Dependencies references non existing library google-play-services_lib.jar

I've been having a terrible time trying to get a simple Map to appear in an app as shown on the Google Maps v2 documentation. Eclipse keeps saying:
The container 'Android Dependencies' references non existing library 'X:\Android Development\workspace\google-play-services_lib\bin\google-play-services_lib.jar'
I found a couple people on here that had the problem and I followed those steps with no luck. I have Google Play Services installed and I even uninstalled and reinstalled it. I have imported google-play-services_lib project into Eclipse and checked move to workspace.
Any help would be amazing as I cannot get this to work. I did check in the location and there isn't a file there, so I don't know why it is missing since I have installed Google Play Services.
This answer worked for me https://stackoverflow.com/a/16398399/1874332
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
I fixed this issue by:
Right click "google-play-services_lib" project, select "Properties".
Click "Android" on left panel.
Check a version of Android SDK on "Project Build Target", then select "OK" button.
Rebuild google-play_services_lib project, now you have "google-play-services_lib.jar" in "bin" folder.
Clean and rebuild your project.
Details: google-play-services_lib project's original build target is android-10. If you do not install this version of Android SDK in Eclipse, Eclipse just don't build it, leaving an empty bin folder. And our project reference to a .jar file in this bin folder, which results in the error message. So to fix this issue is just to check an appropriate build target for google-play-services_lib project.
In Eclipse open Project -> Properties.
Select Android on left.
Check on the bottom that you have a reference to Google play services with a green checkmark. If not, click Add and add the google play services library
I fonund my answer. I hope this helps someone.
I've installed several versions of Android Build Tools. (17, 18, 18.1, 19).
I read other questions and answers. Someone pointed Build Tools.
So, I went to the SDK manager and I removed all Build Tools but not latest. (19)
Clean google-play-servies. And re-build.
Clean my project. And re-build.
Voila~! Thanks all~! I'm very happy!!
I've tried everything but nothing works for me even Google sample projects, at last I've updated all the packages in sdk and eclipse ADT plugin to ADT 14, then it works fine :-)
I solved this by right clicking the google-play-services_lib and building the project.
I 'deleted' it from the workspace and then re-added it, to make sure when I wasn't altering settings / hadn't changed anything important. This built successfully.
I then built my main application and it worked successfully.
I was getting strange path errors and android-9 resolution errors. But it seems to be working now.
My solution is,
clean project google-play-services_lib firstly
then clean my project which depends on play service library
I simply re-imported google play services library project and it worked!
I had the same problem. In order to fix this, you must ensure that your project supports same version of android sdk that is specified in the google-play-services-lib.
So, in my case, I have project that has Minimum Required SDK set to API15. So, once you have imported google-play-services-lib into your project following these steps here https://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject, make sure you open you see the google-play-services-lib in your Package Explorer in Eclipse. Expand it, right-click on it and select Properties. In the Project Build Target, make sure you check an SDK that is at least equal to Minimum Required SDK set in your project, in my case API15:
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...
First of all right click on the Project and import google-play-services if exist otherwise follow the steps told by #yoah (import it under sdk->extra->google->google-play-service-libproject->google-play-services_lib) and if still the problem doesn't solve then there may be multiple problems with multiple solution..
Solutions.
Restart eclipse
Clean the Project
upgrade google-play-services
Installing the new Build Tools did the trick. They were not
automatically included when I updated the SDK
If you have import the code . Be quiet sure to copy it to work space
otherwise this error may occur.
In Eclipse. Right click on your project -> "Android Tools" -> "Fix Project Properties"

Changes to Android library project are not applied until restarting Eclipse

I have a main Android application that is using an Android library project. When I change my library project and Build Project or Build All the changes are not detected in main project until I clean the main project or close and reopen Eclipse.
How con I solve this problem? Is there any rapid solution?
Update
I am using:
Eclipse 3.7.1
Android SDK API 15 Rev 3
Android SDK Tools Rev 19
Android SDK Platform-tools Rev 11
Solution 1) I clicked on Android Dependencies in Package Explorer and pressed F5 (refresh) and built the main project and problem solved.
Solution 2) this answer also works for this problem. It says you can add the project to the build path. ( Right click on project -> properties -> java build path -> Projects -> Add).
Under the Order and Export section, make sure the library is above the Android Dependencies.

The project was not built since its build path is incomplete

Every time I try to import a project downloaded from googlecode into Eclipse but I get some errors:
The project was not built since its build path is incomplete. Cannot
find the class file for java.lang.Object. Fix the build path then try
building this project
Unable to resolve target 'android-10' (this changes from 1 to 15)
I've already checked the other answers on the site but no solution worked.
In
Properties -> Java Build Path -> Libraries
there's 1 item:
Unable to get system libraries for the project
Right click on project -> Properties -> Java Build Path (From Left List) -> Libraries (Tab) -> Add Library (Button on right) -> JRE System Library -> Next -> Workspace default JRE -> Finish
This should solve at least one of your errors. Any others might require you to add further libraries.
Close eclipse and re-open worked for me. You may have to do this two or three times. Each time give it a minute for the auto build startup process (check bottom right hand corner) to complete, as these errors often disappear at this time.
Or try to clean the affected projects.
'Turn it off and on again'
It seems that you lack JDK (java.lang.Object comes from there )
The problem is that you used the same Android API on different PC. Eclipse is lost with path names that are differents but with same API.
To solve it, first re-select Android API version (set to another one and valid, then restore the on you want and validate it -> it will force Eclipse to reload API).
Then go into project->properties-> java build path. Then remove "Unable to get system library for the project" then "Add library" and select "Android Classpath container".
Initially I was trying to import an android project from github and encountered the above problem
cannot configure build path
unable to get system libraries
Package Explorer -> Right click the project -> “Properties” ->
"Android" -> "Project Build Target" = 2.3.3
Note: Also try Clean (On Windows: Project -> Clean) then Refresh (F5) at random. There's a good chance this will magically solve all your problems.
courtesy: KYLE CLEGG
reference link
None of this worked for me. I created a new workspace for the projects. That worked for me! Switching to a new workspace usually miraculously solves a lot of these configuration problems. Simply create a new folder where you would want your new workspace to be and then use 'import project from existing code'.
Goto eclipse → Preferences → Java → Build path.
Do you see a JRE_LIB configured there? If not, add JRE_LIB from JDK/jre lib location. These can be overridden per project. It seems your eclipse isn't aware of Java libraries.
I have seen such errors in past while importing projects in eclipse. The solution to that is to go to properties->Android and select project build target appropriately (Android x.x.x or Google APIs)
Was struggling with this while trying to load the Vuforia Sample App for way too long today. The solution that finally got my project to build was:
1) Window->Android SDK Manager and Install the latest updates
2) Project->Build Path->Configure Build Path->Android and under Project Build Target mark Android 4.4.2 and click OK
3) Clean, Build and Run
I hope this solves somebody else's issue as well, Eclipse is frustrating as F$##!!!
I encountered with the similar problem.....
Make sure that
You create your project within your workspace. If your project is not in the default workspace where .metadata folder within which other plugin folders, and etc. will be present, then it will ask you to configure build path as the project is not build because of incomplete build path.
If the first step is clear, then go for this.....
Right click on your project -> build path -> configure build path -> libraries -> Add libraries -> JRE system libraries -> Apply and close.
I've had similar problem. Exact same error, but in Ubuntu after I worked on project in dropbox folder from Windows.
I've just added android.jar to project. Somehow it disappeared from build path.
For me this problem was related to OpenJDK 6 on Ubuntu.
Update your JRE or install Sun's proprietary JRE instead and restart Eclipse.
I know this is too late. but I am also facing this issue and I fix this by following below steps.
This issue is occurred only if the project shared between different machines.
For me I found java JDK is the problem.
My colleague used mac system and using jdk 1.7. but in my system I used jdk 1.6.
I guess that may be the issue. So I select project and open properties and change my jdk to 1.7
Change target=Google Inc.:Google APIs:19
Clean & Build
Finally issue is fixed. I think this is because of If you build your project with higher JDK version thereafter you should build with same version.
NOTE : we are not facing this issue before until my colleague build with JDK 1.7. After he started to using JDK 1.7 only this issue occur.
Hope it will work for some one. And no need for install new eclipse.
I had my "Build Automatically" turned off in "Project". I turned it off, because the Eclipse was not loading the projects correctly, for various unknown reasons. Turning this on, solved my problem.
if the project is not very big, you can copy the packages and paste it into a new project, you won't see the errors in the new project.
I was having target-18 in my project.properties. But I wasn't having android-18 sdk. So I changed 18 to some other version which I had in my SDK manager, and it fixed the issue.
You just exit eclipse once or twice to reload. It works for me.
Steve's answer does help for some projects, but still, for some projects, it remains the same. I guess that projects were previously build-in early JDK 1.5 (in my case). But I found a workaround for them:
Find the class that causes the problem (Keep expanding the project in the Package Explorer).
Copy the class's contents after the import block.
Delete the whole class.
Right Click on the project then Android Tools >> Fix Project Properties
Create a class with the same name under the same package the deleted class was before. (If the project is imported and the deleted class was an Activity/Service/Provider/Reciever, I guess the class is already included in the AndroidManifest.xml).
Paste the content of the class and import packages.
Clean the project.
I had to delete R.java in the gen folder, then do a clean build. This solved my issue.

Importing existing Android project in Eclipse

I'm getting an error from Eclipse when I try importing an existing Android project.
Android requires compiler compliance level 5.0 or 6.0. Found '1.4' instead. Please use Android Tools > Fix Project Properties.
I did fix the properties and set the compiler level to 1.6 as well. But I'm still getting the same error. Now what should I do?
Try with the following steps. I was able to get it to work today using Eclipse Indigo
Create New Workspace -> Open SDK Manager -> Update the SDK -> restart the eclipse -> Import the project to this workspace -> right click on Project -> Android Tools -> Fix Project properties -> restart Eclipse
For me it boiled down to something I would consider an Eclipse or ADT bug: this problem depends on where the workspace was created!
The problem did not appear when the structure was like this: workspace\project.
The problem did appear when the structure was like this: workspace\somesubfolder\project.
Specifying project specific settings (which is what fix properties does) seems to work around that bug and is maybe a good approach anyway.
Doing Project -> Clean... fixed it for me.
My eclipse had stopped working so I cleaned workspace directory and after I run eclipse when I import the project I had this problem. Other solutions suggested here didn't work.

Categories

Resources