Coder Social home page Coder Social logo

[ERROR] Unable to resolve dependency for ':porcupinemanager@debug/compileClasspath': Could not resolve project :porcupine. about porcupine HOT 27 CLOSED

picovoice avatar picovoice commented on September 26, 2024
[ERROR] Unable to resolve dependency for ':porcupinemanager@debug/compileClasspath': Could not resolve project :porcupine.

from porcupine.

Comments (27)

crossplatformdev avatar crossplatformdev commented on September 26, 2024 1

I am working on my own different project and I can confirm that symbolic links DOES NOT WORK on windows 10. I just landed here reasearching about not working symlinks in Android Studio.

I have a project with its dependencies symlinked inside the folder of the main app project, so I could just add its dependencies and gradle.build files with shorter paths (that was my thought at first) but Android Studio is unable of 'enter across' symbolic links, no matter if they are hard or soft links.

Substituting link's paths by actual dependencies path's does indeed solve the problem.

I am using version 3.2.1 of Android Studio.

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

how did you open the project? please provide detailed steps so I can help.

from porcupine.

wjdgy3746 avatar wjdgy3746 commented on September 26, 2024

Hello!
I open the project by Android Studio-> File -> Open-> and select the porcupine-master folder->demo->android at Open file or Project window.

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

You need to open /demo/android. Please have a look at README there as well: https://github.com/Picovoice/Porcupine/tree/master/demo/android

from porcupine.

wjdgy3746 avatar wjdgy3746 commented on September 26, 2024

The Problem isn't solved.
I already open /demo/android, but it was not working.
I also read README and created porcupine-debug.aar and added as dependency.

Error message doesn't changed.
Unable to resolve dependency for ':porcupinemanager@debug/compileClasspath': Could not resolve project :porcupine.
Unable to resolve dependency for ':porcupinemanager@debugAndroidTest/compileClasspath': Could not resolve project :porcupine.
Unable to resolve dependency for ':porcupinemanager@debugUnitTest/compileClasspath': Could not resolve project :porcupine.
Unable to resolve dependency for ':porcupinemanager@release/compileClasspath': Could not resolve project :porcupine.
Unable to resolve dependency for ':porcupinemanager@releaseUnitTest/compileClasspath': Could not resolve project :porcupine.

I think in build.gradle(Module:porcupine-debug),
implementation project(':porcupine') is not working properly.

Could you help me to solve this problem?

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

I am fairly certain that Android binging and demo app are working. But let's try to find the problem here. I need you to outline every single step to open/run the project so I can try to find the problem. thank you.

from porcupine.

wjdgy3746 avatar wjdgy3746 commented on September 26, 2024

Thank you.
These are the step to open and run the project.

  1. I open 'Porcupine->binding->android' and build.
  2. I get 'porcupine-debug.aar' file in 'Porcupine->binding->android->porcupine->build->outputs->aar'
  3. I open 'Porcupine->demo->android'
  4. I add porcupine-debug.aar module by 'File->New Module->Import .JAR/.AAR Package'
  5. Then, Gradle project sync failed, and Error message comes.

This is project structure.
image

This is build process
image

image

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

OK. Can you please revert all local changes (or get a fresh version of repo). Only open the demo/android project (don't try to build anything manually) and then build that?

from porcupine.

wjdgy3746 avatar wjdgy3746 commented on September 26, 2024

I got a fresh version of repo.
And only open demo/android project.
Results are following.
image
@kenarsa

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

what is the version of android studio you are using? what version of gradle? whats the OS?

I am using androidstudio 3.1.3 and cannot reproduce the problem.

from porcupine.

wjdgy3746 avatar wjdgy3746 commented on September 26, 2024

I am using android studio 3.1.3, gradle 4.4, Windows 64 bits.

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

OK. I am building on a Linux box. That is the only difference. Can you build on Linux/Mac?

from porcupine.

wjdgy3746 avatar wjdgy3746 commented on September 26, 2024

OK. I build on Ubuntu by using VMware Workstation, but same error occurred.

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

Let me think about how to go about debugging this as I need a way to reproduce it. One last question, when you've built on VM did you clone the repository directly into your VM and copied it from your Windows machine?

from porcupine.

wjdgy3746 avatar wjdgy3746 commented on September 26, 2024

I use the shared folder with Windows machine and VM. I clone the repository and put it in shared foloder.

I try to solve this problem, and another error occurred!
Now I can run the project in emulator. But when I press the START Button, the app is closed.
Logs are following
image

Porcupine.java:28 is "System.loadLibrary("pv_porcupine");".
image

I think project can not load pv_porcupine library.
I tried System.load("direct path"); , but it was still not working.

And there is one more question. How can i figure out which OS i'm using such as arm64-v8a, armeabi-v7a, x86, x86_64?

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

I think I know what the problem is. The project is using symlinks and when you clone it on a Windows machine it probably gets messed up! This is my hunch. An easy test would be to clone from VM directly without Windows involved. Could you give this a try?

Also, Android machinery figures what is your CPU and loads the correct binary.

from porcupine.

wjdgy3746 avatar wjdgy3746 commented on September 26, 2024

I clone from VM directly and open in Android Studio.
But modules cannot be loaded.
This is pop-up window.
image

I think there is problem with .iml files.

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

I guess the message is pretty self-explanatory. Do the files exist? Can you find them? If not you need to figure out why ...

from porcupine.

 avatar commented on September 26, 2024

Hello, i have been facing this same problem. The first time I cloned and installed the repo it worked like a charm. I have since formatted and now i have this same problem. You may be correct about the symlinks. When i look in the demo/android directory, there is no folder labeled porcupine where when i had the project working i think there once was.

I cloned the repo, installed a fresh version of android studio and the error occurs.
Could not resolve project :porcupine.

from porcupine.

 avatar commented on September 26, 2024

Tried everything I can think of with no success. I will install linux tomorrow and see how it goes there.

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

Hello @ShannonHall, Are you using Windows? Also maybe you can invalidate the cache of AndroidStudio and restart it.

from porcupine.

 avatar commented on September 26, 2024

Yes i am using widows 10, i have done Invalidate Cache/ Restart with no change.

from porcupine.

wjdgy3746 avatar wjdgy3746 commented on September 26, 2024

I run it using linux and it works! I think there may be a problem running in windows.

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

Thanks. I think the issue is that Windows does not handle symlinks properly. Thanks for helping to debug. Sorry for the inconvenience. I will add this to DOC so that people know about this till we find a long-term solution.

from porcupine.

 avatar commented on September 26, 2024

This I can also confirm its working on Ubuntu 18.04.

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

Thank you @wjdgy3746 and @ShannonHall I am closing the issue and adding a NOTE to documentation that Android demo currently works on Linux and Mac.

from porcupine.

mohammedMaazou avatar mohammedMaazou commented on September 26, 2024

for me deactivate antivirus and sync project resolve the problem

from porcupine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.