Showcaseview NoClassDefFoundError

I added showcaseview jar to my project and used it as

    ShowcaseView.ConfigOptions co = new ShowcaseView.ConfigOptions();
    co.hideOnClickOutside = true;

    ViewTarget target = new ViewTarget(R.id.button_start_game, this);
    ShowcaseView sv = ShowcaseView.insertShowcaseView(target, this, R.string.showcase_main_title, R.string.showcase_main_message, co);
    sv.setOnShowcaseEventListener(this);

but i have an exception

02-05 20:03:25.495: E/AndroidRuntime(25767): FATAL EXCEPTION: main
02-05 20:03:25.495: E/AndroidRuntime(25767): Process: com...., PID: 25767
02-05 20:03:25.495: E/AndroidRuntime(25767): java.lang.NoClassDefFoundError: com.github.espiandev.showcaseview.R$styleable
02-05 20:03:25.495: E/AndroidRuntime(25767):    at com.espian.showcaseview.ShowcaseView.<init>(ShowcaseView.java:105)
02-05 20:03:25.495: E/AndroidRuntime(25767):    at com.espian.showcaseview.ShowcaseView.<init>(ShowcaseView.java:97)
02-05 20:03:25.495: E/AndroidRuntime(25767):    at com.espian.showcaseview.ShowcaseView.insertShowcaseViewInternal(ShowcaseView.java:825)
02-05 20:03:25.495: E/AndroidRuntime(25767):    at com.espian.showcaseview.ShowcaseView.insertShowcaseView(ShowcaseView.java:854)
02-05 20:03:25.495: E/AndroidRuntime(25767):    at com...MainActivity.onCreate(MainActivity.java:82)

82 has

ShowcaseView sv = ShowcaseView.insertShowcaseView(target, this, R.string.showcase_main_title, R.string.showcase_main_message, co);

What could be the problem?

+3
source share
2 answers

I am a newbie developer and I am always fixated on such things ...

The solution is to not use the JAR, instead add the Showcaseview project as a library.

I solved the same problem with the following steps:

  • Import the project "Main", located in the "library" folder, into my workspace https://github.com/amlcurran/ShowcaseView

  • 1 a > Android "" ! [ ] [2]

  • , Showcaseview, "" > "Android" ""
  • 1 "" (: "", "", Github ).
  • ""

!!!

, SO...

+4

All Articles