{"id":7079,"date":"2014-05-19T04:12:42","date_gmt":"2014-05-19T04:12:42","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/19\/android-google-maps-noclassdeffound-collection-of-common-programming-errors\/"},"modified":"2014-05-19T04:12:42","modified_gmt":"2014-05-19T04:12:42","slug":"android-google-maps-noclassdeffound-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/19\/android-google-maps-noclassdeffound-collection-of-common-programming-errors\/","title":{"rendered":"Android google maps &ldquo;NoClassDefFound&rdquo;-Collection of common programming errors"},"content":{"rendered":"<p>i already put in the application tag.<\/p>\n<p>when im trying to move to this activity i got crash.<\/p>\n<p>this is my java file:<\/p>\n<p>**<\/p>\n<pre><code>import com.google.android.maps.MapActivity;\nimport com.google.android.maps.MapView;\nimport android.os.Bundle;\n\npublic class MyMap extends MapActivity {   \n\n    @Override  \n    public void onCreate(Bundle savedInstanceState) { \n\n        super.onCreate(savedInstanceState);  \n        setContentView(R.layout.mapactivity);  \n    }  \n\n    @Override  \n    protected boolean isRouteDisplayed() {  \n        return false;  \n    }  \n}\n<\/code><\/pre>\n<p>and this is my xml file: (at my_api_key i got my own key that i got from google)<\/p>\n<pre><code>\n\n\n    \n\n\n\n<\/code><\/pre>\n<p>and when i go to the editor in eclipse i see: http:\/\/i.stack.imgur.com\/eUUHb.jpg<\/p>\n<p>thanks.<\/p>\n<p>the full stack trace: 03-08 07:06:10.554: E\/AndroidRuntime(18227): java.lang.NoClassDefFoundError: Fproj.dnlgby.MyMap 03-08 07:06:10.554: E\/AndroidRuntime(18227): at Fproj.dnlgby.MenuActivity.onClick(MenuActivity.java:60) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at android.view.View.performClick(View.java:2496) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at android.view.View$PerformClick.run(View.java:9120) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at android.os.Handler.handleCallback(Handler.java:587) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at android.os.Handler.dispatchMessage(Handler.java:92) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at android.os.Looper.loop(Looper.java:130) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at android.app.ActivityThread.main(ActivityThread.java:3859) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at java.lang.reflect.Method.invokeNative(Native Method) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at java.lang.reflect.Method.invoke(Method.java:507) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at dalvik.system.NativeStart.main(Native Method) 03-08 07:06:10.554: E\/AndroidRuntime(18227): Caused by: java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation 03-08 07:06:10.554: E\/AndroidRuntime(18227): at dalvik.system.DexFile.defineClass(Native Method) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:207) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:200) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at java.lang.ClassLoader.loadClass(ClassLoader.java:551) 03-08 07:06:10.554: E\/AndroidRuntime(18227): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 03-08 07:06:10.554: E\/AndroidRuntime(18227): &#8230; 12 more<\/p>\n","protected":false},"excerpt":{"rendered":"<p>i already put in the application tag. when im trying to move to this activity i got crash. this is my java file: ** import com.google.android.maps.MapActivity; import com.google.android.maps.MapView; import android.os.Bundle; public class MyMap extends MapActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mapactivity); } @Override protected boolean isRouteDisplayed() { return false; } } and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7079","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7079"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7079\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}