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

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)

Related

Project is not compatible with monoandroid81(MonoAndroid,Version=v8.1)

I was just coding in my Xamarin.Forms project, and suddenly, this error appeared:
Project is not compatible with monoandroid81(MonoAndroid,Version=v8.1). Project TaskX.iOS supports: xamarinios10 (Xamarin.iOS,Version=v1.0)
I donĀ“t really know what this means. Does anyone have a solution?
After a few days of messing around, it worked when I installed the latest version -
I had 8.1 installed but as soon as I installed "Android SDK Platform 28" (Latest) + updated all sdk's everything worked
maybe updating the sdk's was the solution but just make sure you specify a installed (updated) android version correctly
This is yet another failing of the Visual Studio error list. I am getting this error on my Android projects and a very similar one on my IOS project. Neither project uses NHibernate. I can unload my NHibernate project and both my Android and IOS project still build. Yet the error remains. I can change the error list filter to Build so I can ignore this IntelliSense error. It's not much of a solution but neither is Visual Studio's error list.
I fixed this issue removing an android reference on my iOS project.
Expand reference on your iOS project and look for and .Droid and remove it

android studio: nothing working getting different different errors

I'm trying to learn AS, but after struggling for 3 days no progress.
Using https://www.udacity.com for learning.
Trying the hello world app from there, got this error Gradle DSL method not found: 'android()'.
I've worked in eclipse, but migrating from eclipse to AS looks very tough decision for me. I'm using cordova cli so far, now thinking to use AS.
While runing the app am not able to open RUN TOOL it show but is grey color(which is not clickable).
Downloaded new Gradle version (2.10), and set the path to that directory.But still showing Gradle version 2.2.1 in Project Structure.
Checked in stackoverflow as well, but nothing worked. Worst experieence.
Any body have idea what is going on, would be helpfull.
Android Studio 1.2.2
Make sure you have the latest Gradle and Android Studio:
https://www.gradle.org/
http://tools.android.com/tech-docs/new-build-system/version-compatibility
Go for more
Android Studio Gradle DSL method not found: 'android()' -- Error(17,0)
Udacity's Android courses are using the newest dependencies and AS version.
Please remove existing 1.2 version and upgrade it to 1.5.1 to get the fresh experience and less building problems
Be sure that you're using Oracle JDK7 not Java 8 SDK. It may cause some problems with Gradle
I recommend you also try to follow the steps in this post: I just installed Android Studio and created a new project, it always came up with Error with gradle
Have a question? Please free to ask

Importing facebook sdk to android studio ruins my program

I have updated android studio to 0.5.9 and i downloaded the latest facebook SDK .
My problem is that whenever i try to import Facebook sdk from file ->import module->"facebook SDK path" the support v4 library magically disapears from extrernal libraries and i cant import anything from it(activityBar,fragments etc).So why is this happening?Am i missing something?
I was able to reproduce this while experimenting with test cases in response to this question and filed bug https://code.google.com/p/android/issues/detail?id=70825. We haven't found a root cause yet, but it seems only to happen if you're using Gradle 1.12.
Fortunately, there's a workaround, which is to switch to using Gradle 1.11 by setting the value in your gradle-wrapper.properties file:
distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip

Gradle sync error in Android Studio

I can run other gradle based projects in android studio, but this particular app ( https://github.com/google/iosched ) does not import correctly in Android Studio. I have cloned it from github, and when I import it into android studio using its build.gradle file, the gradle sync error blocks it from running.
"Could not find any version that matches com.google.androis.gms:play-service:3+"
Is there any specific version of gradle needed to run this app in androis studio? I currently have gradle v1.9 installed on my computer.
Please suggest how to get the required gradle fix.
There are typo error in android not androis . Also services not service
com.google.androis.gms:play-service:3+
Change it to
compile 'com.google.android.gms:play-services:3+'
You can also use the latest version
compile 'com.google.android.gms:play-services:4.3.23'

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.

Categories

Resources