Android NoClassDefFound when referencing class from external libraries (IntelliJ IDEA 12) -
i'm having issue intellij's dependency handling in regards external modules. here's context:
i'm writing android app implements google maps. current feature set, require 2 external libraries-- google's play services library , mapex (a third party google map extension library located here https://code.google.com/p/mapex/). built of project in android studio before recommended move intellij due easier dependency handling. i'm here , still having problems.
my error
when trying build object class located in mapex package (com.androidnatic.maps), error when starting activity view contained in (object has not been created yet):
07-03 11:40:35.837: error/dalvikvm(3585): not find class 'com.androidnatic.maps.simplemapview', referenced method com.example.myproject.mapactivity.showheatmap
and then, upon creation, app force closes , leaves behind in logcat:
7-03 11:40:45.467: error/androidruntime(3585): fatal exception: main java.lang.noclassdeffounderror: com.androidnatic.maps.simplemapview @ com.example.myproject.mapactivity.showheatmap(mapactivity.java:492)
yet i'm stumped because ide gives me no sign wrong! classes auto-filled in when trying access them myproject.
ide-fill-in http://www.tonyandrys.com/img/fillin.jpg
no build errors missing classes, missing modules, class definitions, or related.
i same results if try access class via full package name well.
// no dice. final simplemapview mapview = new simplemapview(this, "apikey"); final com.androidnatic.maps.simplemapview mapview = new com.androidnatic.maps.simplemapview(this, "apikey");
it seems there's issue when application running on phone, far ide concerned.
here's structure of myproject:
main-project-structure http://www.tonyandrys.com/img/mainstructure.jpg
here's main project's dependency settings (where assume screwed somewhere): project-structure http://www.tonyandrys.com/img/projectstructure.jpg
and here structure of mapex library module:
mapex-lib http://www.tonyandrys.com/img/mapexstructure.jpg
the class files i'm trying access live in mapexlib/gen , mapexlib/src, marked source directories (blue).
does have ideas on how proceed here?
try : android, intellij idea, changing module type
i had same error "could not find class xxx referenced method xxx" intellij, involving android test module , test not find activity class anywhere. set inside project structure main module's facet android library module (checkbox) , worked...
let know
Comments
Post a Comment