Вопрос

I'm trying to execute sample from Google Developers, but in my code the CameraManager import is not available.

I have tried registering my intent for my activity:

<intent-filter>
    <action android:name="android.media.action.IMAGE_CAPTURE" />
    <category android:name="android.intent.category.DEFAULT" />
</intent-filter>

Also requested permissions:

<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

But no way the import com.google.android.glass.media.CameraManager becomes available.

By the way, I'm using SDK version 19. Some data from build.gradle:

compileSdkVersion 19
buildToolsVersion "19.0.3"

defaultConfig {
    minSdkVersion 19
    targetSdkVersion 19
    versionCode 1
    versionName "1.0"
}

What am I missing?

Это было полезно?

Решение

Set:

compileSdkVersion "Google Inc.:Glass Development Kit Preview:19"

I am not sure, but you may have to put gdk.jar in your libs/ dir too.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top