trouble importing google services - android

am having a problem with android, I have a project in eclipse, these are the errors:
the import com.google.android.gms.wearable.internal.ar cannot be resolved
the import com.google.android.gms.internal.ob cannot be resolved
I already added google-play-services.jar as we can see in this pic
and this is what I have in the SDK manager

Android development in Eclipse can be a frustrating experience.
If the flexibility is there, I would strongly recommend moving over to Android Studio: http://developer.android.com/tools/studio/index.html

Related

Migrating eclipse project from github to android studio

I am in the process of migrating my current project from eclipse to studio which is present on github.
My project makes use of google play services lib and an another library (calendar lib to be precise)
I tried many ways of migrating to studio following the tutorials on the net but I am not able to achieve it.
I am getting problem with my Google play service library. The error is cannot find resource #integer/google_play_services_version
At this point of time I confused don't know Wat to do. Can some please tell me proper way of migrating.
It will be of great help. Thanks in advance :)
You are seeing the error in Android Studio? This should not be the case, as Android studio handles libraries through gradle dependancies. You can check your build.gradle for the dependencies. If you are seeing this error, I assume it is in Eclipse, which the link #SurajPalwe13 provided should help fix.
Migrating from Eclipse to Android Studio should be as easy as Importing the Eclipse project into Android Studio.
In Android Studio, File > Import > Select Eclipse project directory. Then a import wizard should come up.
Alternatively, you can export your Eclipse Project to contain gradle files:
In the latest version of Eclipse, Right Click Project > Export > Android > Gradle. Then follow through the export wizard. You should then be able to import the build.gradle file in Android Studio.

Android.Support.Wearable.Comapnion.WatchFaceCompanion won't import Android Studio

I am not using Eclipse. I am currently using Android Studio 1.0.2. I am attempting to complete the creating watch faces tutorial however I am not able to compile due to
import android.support.wearable.companion.WatchFaceCompanion; not importing.
I've searched here, and the other questions are for those using Eclipse. I've added all of the sdk build tools. This didn't work. I modified the gradle build items in wear/app and that didn't work.
Edit: I dug into the issue a bit more via the example and I noticed the import is referenced here:
G:[my_windows_username]\Android\WatchFace\Wearable\build\intermediates\exploded-aar\com.google.android.support\wearable\1.1.0\classes.jar!\android\support\wearable\companion\WatchFaceCompanion.class
Why isn't this in my new project by default when I attempt to import?
This is more than likely an issue where you have not added the line:
compile "com.google.android.support:wearable:1.1.+"
to your build.gradle for your APPLICATION module. This should fix your issue
I had the same problem with in my watch face application. I solved by installing/updating the Android Wear 2.0.1 version from SDK Manager in Android Studio.
I suggest, check out in build.grandle if there is an error on android.support.wearable.2.0.0 compilation. Then try to install newest SDK tools (wear 2.0.1) and lib (25.0.2)

Facebook SDK is not working on Android Studio

I have follow Scott Barta solution to import Facebook SDK on the new version of Android Studio (here) but now i'm having trouble using this sdk.
When I import import com.facebook.android.Facebook;I can't run my apps, it keeps reporting error: package com.facebook.android does not exist and all my methods that refer to facebook are "deprecated".
Does anyone know where this could come?
I have been facing similar issues with the latest Facebook SDK update, if you're using Gradle, I'll strongly recommend you, to first try to do a Gradle Sync as you can see here:
https://stackoverflow.com/a/19932896/799162
If that doesn't work ( as my case) you can force gradle to download your dependencies as shown here:
https://stackoverflow.com/a/13567793/799162
as an extra thing to do, try to do a clean on your build.

How do I upgrade from cordova android 3.2 to 3.3 with eclipse?

Following the latest instructions from the docs I ran the update command with the cordova cli. I also updated eclipse and the android tools to API 19 as requested.
In the docs it says "IDE users will need to import the newly added MyProject-CordovaLib project into their workspace." However, when I go to eclipse and import the library, I don't know where it is. If I import the CordovaLib folder that is within the android folder, it comes up as "null-CordovaLib" And I still get build errors.
Can someone help me out here and provide me with the instructions to get this going?
I am also seeing similar behavior except the build error goes away when I import null-CordovaLib.
As a workaround, try recreating the project rather than upgrading it and then copy your html assets to the newly created project.
It might also help if you post the text of the error's you are seeing or the error log view.

Import android Eclipse project into android studio

I get the following error when trying to import my project into Android Studio. I have tried to update everything in eclipse before exporting and also in android studio (2.10). I can create a new android project, just have not been able to import it! any pointers in the right direction would be helpful. Also, I'm not that familiar with the Android studio IDE log and have not been able to get any useful information from it.
Thanks!
To correct this problem I started with a fresh instal of both Android Studio and and Eclipse. I was then able to export and then import the project.

Categories

Resources