android wear - eclipse : not recognizing support library -


im trying develop new wear sdk.

i have downloaded everyting needed including support libraries , set android wear go. problem have project cant find wearable libararies.

code error lines example:

watchactivity cannot resolved type 

and

the import android.support.wearable cannot resolved 

thank you, yakir.

i've gone through same issues using eclipse , answer problem following link i've found:
http://blog.benjamin-cabe.com/2014/07/04/how-to-setup-eclipse-for-android-wear-development

watchactivity:

just don't use watchactivity - use standard activity instead.

the import android.support.wearable cannot resolved:

first step make sure have installed google repository in sdk manager. should located somewhere below android support repository
enter image description here

after downloading google repository:
in android studio need add dependency wearable-support lib done here: https://developer.android.com/training/wearables/apps/layouts.html#uilibrary.
if want use class android.support.wearable package eclipse little bit tricky.

wearable package not included in standard android-support library - need use wearable ui support lib located in google repository: com.google.android.support:wearable
unlike standard android-support libs, 1 not provided .jar file or project code can import right workspace, it's in .aar format (like jar including res).

please find file here, relative sdk folder:
./extras/google/m2repository/com/google/android/support/wearable/1.0.0/wearable-1.0.0.aar

  1. unzip wearable-1.0.0.aar file somwehere workspace (you can see looks standard android project)
  2. move classes.jar /libs/classes.jar
  3. now have create new project these files, package name defined android.support.wearable
  4. compile api 20 , select "is library" in project properties
  5. add reference library project project

i recomment take @ blog post. there explained step-by-step. if have project feel free ask in comment here.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -