Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The system cannot find the <strong>MainActivity.class</strong> in your <strong>com.formation.gmaps</strong> package. This can be caused by many things but you can <strong>check if</strong>:</p> <p><strong>1.</strong> You declared your activity <strong>com.formation.gmaps.MainActivity</strong> in your <strong>AndroidManifest.xml.</strong></p> <p><strong>2.</strong> Your MainActivity.java has the correct package name set in the top of the file (e.g package com.formation.gmaps).</p> <p><strong>3.</strong> You should have <code>import com.formation.gmaps.R;</code></p> <p><strong>4.</strong> Use the shortcut CTRL + SHIFT + O in Eclipse. This will import any missing classes.</p> <p><strong>5.</strong> A Project -> Clean could also help(provided you're using Eclipse).</p> <p><br> <strong>EDIT</strong></p> <p>In your AndroidManifest.xml change <code>package="com.formation.gmaps.MainActivity"</code> to <code>package="com.formation.gmaps"</code>. </p> <p><br> <strong>EDIT 02</strong></p> <p>Your problem is your MapActivity.java. <strong>Read <a href="https://developers.google.com/maps/documentation/android/" rel="nofollow noreferrer">this</a></strong>. If you used the latest API then this paragraph explains it:</p> <blockquote> <p>Because maps are encapsulated in the MapFragment class, you can implement them by extending the Android standard Activity class, rather than extending the MapActivity used in version 1.</p> </blockquote> <p>So please check your MapActivity.class. If it extends Fragment then the problem is there. You can test this by changing your MainActivity to extent Activity instead of MapActivity. Do not forget to add <code>import android.app.Activity;</code></p> <p>If you're still using V1 of Maps then read the documentation on the link I have provided and switch to V2. You might still be using the old version which requires the process of importing a maps.jar.</p> <p><strong><a href="https://stackoverflow.com/questions/3621163/cannot-resolve-mapactivity-class-on-android">This</a></strong> might help you as well.</p> <p>Good luck and let us know if you run into more trouble.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload