Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resolve symbol LogicState #9

Open
azharsaepudin opened this issue Apr 19, 2020 · 1 comment
Open

Cannot resolve symbol LogicState #9

azharsaepudin opened this issue Apr 19, 2020 · 1 comment

Comments

@azharsaepudin
Copy link

How to resolve? I use android studio 3.6.1

library :

implementation 'com.google.android.things.contrib:driver-button:1.0'
compileOnly 'com.google.android.things:androidthings:1.0'

try {
// Step 3. Initialize button driver with selected GPIO pin
buttonInputDriver = new ButtonInputDriver(
BUTTON_PIN_NAME,
Button.LogicState.PRESSED_WHEN_LOW,
KeyEvent.KEYCODE_SPACE);
} catch (IOException e) {
Log.e(TAG, "Error configuring GPIO pin", e);
}

@Fleker
Copy link

Fleker commented Apr 20, 2020

Are you importing the right Button class in your Java class? You might be importing the UI widget button rather than the physical button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants