Unable to enable Visual View View lib

I'm having problems displaying the ShowcaseView library in an Android app with Android Studio.

The GitHub repository ( https://github.com/Espiandev/ShowcaseView ) says that it should be easy to install from Maven. But when I look for showcaseview, Maven does not find the result.

So, I clone the repo on my computer and try to include it in the library folder as a java library depending on my project module. But when I try to use it in my code, it says

Unable to resolve showcaseview symbol

My hunch is that the actual ShowcaseView library is not compiling due to errors (the cloned repo shows an error in several files

Unable to resolve character "R"

after adding NineOldAndroids as a module dependency, as shown in the GitHub repository.

Is there something I am missing?

+6
source share
2 answers

You should not include the library library as a java library.

try using the ShowcaseView library as a module for your project:

Go to file> Project Structure ...

select "Modules" in the left pane, click the plus icon in the middle pane, and then select "Import Module" from the browser selection dialog in the ShowcaseView library

click next ... to finish the import (but notice the directory /gen of library unchecked)

Then go to the "Library" section in the left pane and select libs in the middle pane

if the library robolectric-2.2-20130909.210745-40-jar-with-dependencies.jar exists in the right pane, you must delete it.

Go to the Modules section and select the main project module in the middle pane and click the plus icon in the right pane and select Module Dependency... , then select the ShowcaseView library presented earlier.

Now you have to rebuild your project ...

+2
source

Go to the ShowcaseView manifest and change the package name to com.espiandev.showcaseview rebuild, reinstall the import, R will solve the new package.

0
source

Source: https://habr.com/ru/post/957205/


All Articles