Issue
There is a problem with importing Cardboard SDK to my project.
I downloaded cardboard-java Github repository then copied the files from it's library to my project's library folder and added the following dependencies:
compile project(':libraries-common')
compile project(':libraries-commonwidget')
compile project(':libraries-videowidget')
But it gives error saying:
Project with path ':libraries-common' could not be found in project ':app'.
Please help me to understand what I'm doing wrong, and tell me if there is another way of importing the SDK.
Thanks
Solution
The project
syntax is used to describe a dependency on a separate subproject of your root Gradle project. Note that the example repository is aware of all the library subprojects. You probably need to update your own settings.gradle
to similarly be aware of the library subprojects you have copied into your Android Studio project.
Alternatively, start over and make sure you follow every step from this Getting Started guide. In particular, using the New module import method should automatically update your settings.gradle
file as you go:
First, grab all the required .AAR files from the libraries folder of the sdk. To determine which .AARs you need to depend on, you can examine the build.gradle files of the various sample apps. For example, samples/treasurehunt/build.gradle's dependency section has the following entries:
dependencies { compile project(':libraries-audio') compile project(':libraries-common') compile project(':libraries-core') }
This indicates that an application similar to the Treasure Hunt sample needs the audio, common, and core libraries.
Create new modules for each of these libraries. Using Android Studio's GUI, this can be done via File -> New -> New Module.... Select Import .JAR/.AAR Package. Locate one of the .AARs and import it.
Then add this new module as a dependency to your main app via File -> Project Structure -> Modules (on the left side's section list) -> YOUR APP's MODULE NAME -> Dependencies (on the right side's tab list) -> '+' -> Module Dependency.
Answered By - stkent
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.