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
Related
For the last 2 days I've been trying to simply get Google play game services Integrated into my game. I've followed the instructions here...
https://github.com/playgameservices/android-basic-samples/blob/master/README.md
...many many times. I have been trying to get it to build with Gradle but for now, I'll just focus on Eclipse building until that works. I've imported BaseGameUtils project into my workspace as an Android library project. My game android project has two Android library dependencies: google-play-services_lib and BaseGameUtils. Everything in Eclipse is showing without any errors. When I build and run on a real device, I see an error that says -
[2014-10-27 20:39:25 - BaseGameUtils] Could not find BaseGameUtils.apk!
I don't know why it's even looking for BaseGameUtils.apk since it should be an Android library. That said, I'm not sure how an Android library is really handled so maybe it should be a .apk. In any case, I couldn't find any information on this bug and the error message doesn't give me much to work with. I've tried adjusting things in the Build Path but no luck. I did have to remove some redundant dependencies in my Build Path earlier since I was getting some kind of duplicate DEX error but I'm not sure that's related in any way to this. I am desperate for help, anyone have any idea?
Can you try this? It has to do with conflicting methods of specifying that a project is a library.
I found the source of the problem!
It turns out that "with the new library feature, you don't specify the
Android projects you depend on in the Java Build Path section of the
Properties. You do it in the Android section of the Properties".
So all I had to do is go the Application Project's Properties, hit the
Projects tab, select my own library project and click the Remove
button. That's it. No more problem.
In Eclipse Java EE select the project Properties, then select Project
References, then check the FacebookSDK (see screen capture)
From: Android Eclipse - Could not find *.apk
If that doesn't help, you may want to double check that you selected "Is Library" in BaseGameUtils.
Also, when you hit "Run" in Eclipse, are you running your application and not BaseGameUtils?
Please would you check that BaseGameUtils has "is library" checked and that your application project DOES NOT have "is library" checked.
If this is correct, then please would you review the following in detail (especially as regards checking and unchecking "is library" ) :
Android Eclipse - Could not find *.apk
I presume that the DEX error related to two or more versions of the same lib. What is the specific GameHelper error ?
As a general point, I find it productive to get a sample project working first to ensure that I have got the environment working correctly before I start integrating game services into my own projects. If you have been changing the build path then it may be quicker to start from scratch and get a sample working. I have followed those instructions in the past and they are accurate.
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
I am getting ViewPager.PageTransformer cannot be resolved to a type I have updated the sdk to the latest and have the latest version of android-support-v4 in my libs folder and i read this post ViewPager.PageTransformer showing error ViewPager cant rersolved to a type i am using androidsupportv4 jar revision 9 and did the same steps but it didn't work.
You should remove ViewPager. from the begginging of declaration.
So, that would looks like just PageTransformer
Plus, import android.support.v4.view.ViewPager.PageTransformer;
that worked perfect for me.
Okay, I found the solution. You need to update your Android Support Library package. But if you have it now you need to uninstall it first then install it again in order to get new one.
If you have IntellijIdea:
Open SDK Manager window from "Tools/Android/SDK Manager"
Find Exteras folder then check Android support library. If its status is
installed click "Delete 1 package..." in order to delete it.
Check this package and click on install button.
Navigate to \extras\android\support\v4 then copy
android-support-v4.jar and paste it into your Libs folder.
Idea should recompile the project automatically, however if it didn't do
that then you should recompile it manually by click on
"Build/Rebuild Project"
That's it ;)
Realized I never answered this question. To solve this I grabbed the android-support-v4 from another computer and it worked. This could have the same effect as uninstalling and re-installing but i didn't try it.
At one point I had also found myself with the same issue. Apparently it is because whenever I decide to launch the Android SDK Manager within Eclipse I had been excluding an important step in the update process.
I always 'uncheck' the 'installed' option when trying to update. It was always my assumption that since the other checkmark labelled 'new/updates' would keep the updates visible to the installation. This actually is not the case though. Once I left 'installed' check-marked I saw updates from previously installed components. Then I was able to install the missing features that I thought were already up-to-date on my computer.
Hopefully, you find this helpful for getting the latest. It was misleading to me.
--Edit--
After getting the latest however, the post you referenced was what ended up resolving the issue for me however. I did not find a quick efficient way to sync with the latest version of the compatibility library. It is probably because on creation of the application it copies int he latest version locally into a project. So, you have to manually copy over the latest compatibility library.
Be sure to copy over the latest compatibility library however to all other supporting Android libraries that it also depends on as well. Otherwise you will get build errors with the new compatibility library in you local project settings.
You will need to get the Version 18 of the Android Support Library.
Make sure to update to that version using the SDK manager and then copy "android-support-v4.jar" and "android-support-v13.jar" to "libs" folders of your project.
That should take care of the issue.
Update your android support library from sdk manager.
Copy the android-support-v4.jar from \sdk\extras\android\support\v4 to your project's libs folder.
import android.support.v4.view.ViewPager.PageTransformer
Change ZoomOutPageTransformer implements ViewPager.PageTransformer to ZoomOutPageTransformer implements PageTransformer.
Thats it all errors will be gone and the animation works really well.
Help needed!!!! Stuck for 2 weeks on this and help needed.
I've recently imported the facebook sdk for android and its projects into my workspace. It shows up errors and the problems:
Archive for required library: '/home/Documents/facebook-android-sdk-3.0.2.b/facebook/libs/._android-support-v4.jar' in project 'FacebookSDK' cannot be read or is not a valid ZIP file
And the samples get errors along the line of:
The container 'Android Dependencies' references non existing library '/home/Documents/facebook-android-sdk-3.0.2.b/facebook/bin/facebooksdk.jar'
The things I have done following the other discussions without any success are
cleaned project
set the Facebook SDK as library
looked at the build path section and added external jar consisting of facebook/libs
imported fb sdk like 20 times and into different folders.
made sure my java compiler was 1.6
HELP would be very greatly appreciated!!!!
Take the lastest version of android-support-v4.jar (in your sdk environement : sdk/extras/android/support/v4/android-support-v4.jar) and replace in your project and library project do not create conflict.
The steps to importing a library are:
Download the library
Place the library in the libs folder of the project.
Build the project
Do Not attempt to import the library using some import wizard.
I suspect either your download was corrupted, and you need to do it again, or you put the file into the wrong directly.
I think your problem is that the android.support.v4 versions are different, take the one from your project and replace the one in the Facebook sdk lib folder, it should dismiss the clash.
As per your question, I think you are not able to compile once you add the SDK to your project. Do you get an error saying unable to run as library?
If so that means you have included this as library and create your project as a library to be used further. It is a common mistake that I have seen many people do when they try to import a library to use and tick mark the checkbox is Library. This actually means you want this project to be treated as a library for future use. Just try to add the SDK and do not tick mark the checkbox and this project will run fine.
Many forums will just tell you to tick that checkbox and you will be stuck on this error for long time.
For any .jar file related issues you have to make the .jars files compatible as there hashing a problem and the two jars are not compatible with each other (a version issue).
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.