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

Unable to build in Android Studio #60

Closed
chrisspen opened this issue Dec 19, 2020 · 7 comments
Closed

Unable to build in Android Studio #60

chrisspen opened this issue Dec 19, 2020 · 7 comments

Comments

@chrisspen
Copy link

I tried following these instructions, but they no longer worker work in the current version of Android Studio 4.1.1 on Ubuntu.

After selecting the option to start a new project from source control, using https://github.com/cmusphinx/pocketsphinx-android-demo as the URL, it seemed to create the project successfully. However, the "Build" panel shows the error:

Failed to find target with hash string 'android-26' in: /home/chris/Android/Sdk

Presumably, this means it's missing the required Android version. However, your instructions said:

"Once the project is set up, your IDE will update and download all dependencies automatically."

Searching for this error message shows this type of error is somewhat common. However, none of the suggested solutions work for me. I've just installed Android Studio, so I have no cache to clear. And the solution to install the dependency via the SDK Manager doesn't work because there's no reference to an SDK Manager anywhere in Android Studio.

Do you still support Android Studio, or has this been deprecated? How else can I build the demo on Linux?

@nshmyrev
Copy link
Contributor

You need to figure out which sdk do you have installed. SDK manager is there in the Tools. For more update you can check:

https://developer.android.com/studio/intro/update

To open the SDK Manager from Android Studio, click Tools > SDK Manager or click SDK Manager in the toolbar. If you're not using Android Studio, you can download tools using the sdkmanager command-line tool.

Probably you have android-29 instead of 26.

@chrisspen
Copy link
Author

That's strange. I read an article saying the SDK Manager should be under Tools, but nothing called that was in my default Tools menu. Then I ran some recommended plugin updates, and now it's showing up.

@chrisspen
Copy link
Author

It seems to have built now. However, there are two options to "run" the project. Should I run "app" or "wear"?

@nshmyrev
Copy link
Contributor

wear is for Watches and similar devices

@chrisspen
Copy link
Author

Running neither app nor wear seems to have any effect.

Running gradle installDebug from the command line fails with the error:

com.android.builder.testing.api.DeviceException: No connected devices!

Even though I have an Android 10 device connected via USB.

@chrisspen
Copy link
Author

Nevermind. I had enabled USB debugging, but because I enabled that while my phone as already connect, I apparently needed to disconnect and reconnect my phone for my computer to recognize it.

@chrisspen
Copy link
Author

I was able to successfully install it via gradle installDebug and then run it from the application menu.

The only oddity is it appears to install two seemingly duplication applications, which use different icons.

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

No branches or pull requests

2 participants