Google_play_service_lib jar missing - android

I'm trying to add admob to my android app and can't seem to solve this problem. I have imported the whole google__play_services_lib into my workspace, added it to my android project file as a lib, cleaned it a 100 times, updated the android sdk manager 10 times, checked for updates, upgraded to eclipse mars from juno, replaced jar files all over the place and got errors in my res file because of that, I have built projects, then got errors with my appcompat_v7 lib, I have managed to solve that, but the google thing is very-very frustrating and I dont have ideas anymore. I have messed around with my build path again & again. When I refresh the SDK manager, the google-play-services-lib.jar is nowhere to be found on my computer, however, I assume it should be, idk.I have downloaded it, but even that did not work out well. I have a jar.properties file that I shows up from time to time. I have also searched for sources where I can find this whole thing zipped, so I can use that instead of the SDK, cause I dont trust it anymore. So I am stuck.
enter image description here

Related

How do I get rid of (1) after android studio project files?

So I have been working on an app for a project in the android studio for school. Since I am working on it both at home and at school, I uploaded my project to google drive to access it at school. However, when I downloaded the project, unzipped it, and opened it in Android Studio, nothing is showing up and I can't build, clean, or run anything for it. I attached pictures. I suspect this may be due to the fact that since I already uploaded a version of my project to drive before, it added (1) to the end of almost every file in the project. I'm not sure whether this is causing the problems in the android studio. How do I remove them, any suggestions?
ok looks like there is actually no way to do this, oof

Android R cannot be resolved after importing Google Play Services

I'm developing an android application and I've gotten pretty far already.
but recently I opened my eclipse again to continue my work, but there was a problem with my settings for the google play services. (I'm kinda sure it happened after I installed the new version (revision 7) from the android SDK manager.)
So I imported the google-play-services_lib and the google-play-services.jar again and the errors went away, so far so good I thought.
But now eclipse can't resolve R to a type and I can't run the app either...
I've searching the whole day to save my project from these errors and now I'm getting this one...
btw the project ran perfectly for 4 months...
can anyone tell me wat to do?
EDIT:
what I tried so far:
I've added all android build tools, google play services (libraries and projects),... Imported the google play services project into workspace and cleaned the project like 30 times. I Already checked private libraries, android dependencies etc. to export
I had the same problem I think.
In /gen there was no R.java for me but when I updated my SDK-Tools everything was fine since they seem to have changed the order in the last version.
Try that maybe!
Found it:
the SDK was already updated, but the device settings were changed somehow (now it was compiling for android 4.2.2 instead of 4.0.3) and when I cleaned the project, it updated some code I didn't notice, when setting the 4.0.3 build target again it wouldn't compile nor generate the R.java file (giving me loads of errors).
So what I did was change the project build target to 4.0.3 again, but I must have missed some lines of code that were updated to the 4.2.2 target... (leading to the R file not being generated, leading to more errors that were leading to more errors... just a vicious circle)
I didn't exactly remember what line caused the error, I was too happy it was solved I guess :)

Problems after updating to Android SDK 20 in Eclipse

I updated tools in my Eclipse first by going to Help->Check For Updates and installing everything i that it suggested. Then by going to Window->Android SDK Manager and updating multiple things including my SDK version.
After I have finished my update all my Android projects got a nice red box with an x inside it. I explored the projects and noticed that none of them had any errors inside the project just the project itself had the error icon. I searched online and i found that other people had similar problems. So i thought i found the solution. Alas after cleaning and building the project I got additional error icons next to multiple java files in my projects. Eclipse cannot locate the automatically generated R files when it tries to import them and all the imports are selected red.
I tried deleting the whole content of .android directory (starting with specific few files then the whole content) but that did not bring desired results.
So i have deleted the newly generated files and restored all the old ones.
When I clean and build the projects again all the errors disappear but only until I try to run the project again and then same error appears:
Your project contains error(s), please fix it before running it.
I have also found a related question. It claims that there must be a problem with my xml files. I did not modify any of my xml files since updating the tools so I dont know what could cause them to have errors.
Any ideas as to what is going on??
I've found that eclipse is now picking up errors that it didn't pick up before, because they updated lint, you may have to check all your files and see if there is an error because of this, if it doesn't work try removing Android from the build and reattach it, clean the project, build project, make sure the activities are using the right R files and check what lint says, its like a little square with a tick in it I think.
I had exactly the same problem, solved by removing any imports of R in my code and then cleaning the project
Strangest thing just happened. Even though I have done this 2 times before I have again deleted all my files in .android folder exited my Eclipse and opened it back up again. All the errors were gone and most of my projects work correctly. I have spend a lot of time on this problem and i dont know how it got resolved but Im glad its working again.

Eclipse - Android not auto-generating R class

have an odd one..
Using Eclipse Juno, and everything was working fine for the last couple months. At some point yesterday, while Eclipse was cleaning my project, something crashed - popped up the Windows error reporting. (Didn't catch the name of what crashed..)
Now, I have no R.java class in /gen, and nothing I've tried will generate it. On top of that, when doing a clean rebuild of the project, the Output window remains blank. (No errors, no status message.. nothing.)
Tried just about everything - including the latest which included reinstalling Eclipse and then ADT. Still hadn't helped. (I have NOT tried clearing the workspace metadata yet, will do that soon.)
Any thoughts on what else to check?
--Fox.
Edit: Updating a random file - either .java or an XML layout/drawable does not have any effect, still nothing. Also, removing saved preferences from workspace .metdata data didn't have an effect either.
Edit 2: Okay - not sure WHY it was happening, but creating a new project and the issue was corrected.
So somehow either the project settings (.settings or project.settings) must have gotten corrupted. I have the origianl project still, and am curious to see why it happened, but creating a new project and copying sources and resources over, and no more issue.
Thanks to all that offered comments - goes to show that any kind of little corruption can cause strange things to happen.
The reason in 99% of the cases is that you are missspelling something in some xml file.
The R class file won't appear until all xml files are correct.
I suggest look carefully into your XMLs for a very small syntax error.
Or try taking off 1 by 1, until you figure it out wich one is the problematic.
:) kind of annoying, i know.
If you don't have any errors in your xml files, you tried to reboot your eclipse, your emulator, then open the sdk manager and apply all update. My R have finally been generated.
I found this happened after updating my Android SDK Manager and related eclipse plugins. I am running in Ubuntu, and it would not let me update the plugins unless I ran as the root user (using "sudo eclipse")
This left some of the Android SDK Manager items, and the eclipse plugins, owned by root. This stopped the "clean" working on the project - it must have been something that had been added as the root user, and not accessible as my normal user.
I had to "chown" my eclipse directory and my Android SDK Manager directory so it was owned again by my normal user:
cd /home/myacct/android-sdk/
chown -R myacct:myacct *
After this the clean option worked, and R was regenerated.
This was it for me:
In your AndroidManifest.xml file, make sure that you have the SDK installed for the version number in android:minSdkVersion="##".
You can install SDKs from the Android SDK Manager, found under Window -> Android SDK Manager in Eclipse / ADT.
For me it ended up being gen/com/(appname)/R.java missing.
Not in my recycle bin, not anywhere... just took a surprise vacation and never returned.
I had a backup copy in a different folder. Copied it back and all's good now

Cannot run Android project in Eclipse despite no errors

When I try to run my Android project(which was working fine yesterday) I get the "Your project contains errors, please fix them before running your application" dialog. But my project has no errors. I've had this problem before, and the solution was always to Clean the project, but this time it isn't helping. The red X icon disappears from the project in the workspace, then reappears when I try to run it. Also restarted Eclipse so it rebuilds the project. Help?
Go to your .android folder and delete your debug certificate. In my computer it is in this path
E:\Users\blessan\.android
Inside that there is a file name 'debug.keystore'. Delete that,clean and try to build the project again. Sometimes this error is caused when the certificate expires.
There are a couple of reasons as to why this might happen. Give these problems / solutions a try.
Problem with your Manifest. These don't always show up, so give your Manifest a thorough check.
Suddenly missing / moved libraries or other dependencies. Right click your project, choose Properties and check the tabs under Java Build Path. When you accidentally remove / move a library file, or any other file the app is dependent on, it can cause an error like this without showing up as an actual error. However in the Build Path screen it will show with a little error sign.
Problems with your R.java. I had an issue with this before where there was a corrupt value in the R.java file. "cleaning" the project didn't fix it, but forcing Eclipse to rebuild the file due to me erasing it manually did.
Problem with a cached version of your app. This one is a real pain cause there are no pointers for it, but sometimes for some reason Eclipse decides to mess with a cached version of your app. This can cause anything from apps not working to apps showing images that have long been replaced by other ones or have been deleted entirely.
If the other fixes don't work, try navigating to your project folder and removing the /bin folder. After that, rebuild the project and try to run it.
I hope one of these works out for you.
This problem is occur some time when you replace new debug.keystore file with the old one.
delete deug.keystore may fix the problem

Categories

Resources