0

i have problem. i will try to make maps, but when in onCreate i have problem. i have two problem.

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    SupportMapFragment fragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
    mGoogleMap = fragment.getMap();

    handleIntent(getIntent());

i have two problem

in setContenView(R.Layout.activity_main)

the problem is R cannot be resolved to a variable

in SupportMapFragment fragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);

the problem is

Multiple markers at this line

SupportMapFragment cannot be resolved to a type

map cannot be resolved or is not a field

SupportMapFragment cannot be resolved to a type

please help me,

thanx

MrFlick
  • 195,160
  • 17
  • 277
  • 295
user3001890
  • 21
  • 1
  • 10
  • Any problem related to R means there is some error in any xml file of yours. Try and check all the xml files for any error is possible. Also , check for imports and project libraries (if any) Sometimes, the xml doesnt shows error, so you may have to go line by line to check for errors that may have risen accidentally. – Atish Agrawal Oct 26 '14 at 05:17
  • are all your xml in res folder error free?? – Panther Oct 26 '14 at 05:21
  • for the @Panther just one file, but that's not eror, that's alert. so how? – user3001890 Oct 26 '14 at 05:25
  • wats the alert, also check the package name in `AndroidManifest.xml` and your `java` file. Both must be same :-/ – Panther Oct 26 '14 at 05:28
  • for @AtishAgrawal so, i must look at line by line for the folder and file in res?? when i try to import package R, there is problem again. so i get confused. why my project – user3001890 Oct 26 '14 at 05:29
  • my package in AndroidManifest.xml like here ` ` and code in MainActivity.java like this `package in.wptrafficanalyzer.locationsherlocksearchviewmapv2; ` – user3001890 Oct 26 '14 at 05:33
  • u r ide and build system? – Panther Oct 26 '14 at 05:34
  • what it's ride?? ride it's write?? yes i want make a systems the system is about navigation traffic. this system for my thesis – user3001890 Oct 26 '14 at 05:39
  • wats ur `IDE` and `build system` u r using ??. Try to clean and rebuild the project. – Panther Oct 26 '14 at 05:44
  • 1
    possible duplicate of ["R cannot be resolved to a variable"?](http://stackoverflow.com/questions/7824730/r-cannot-be-resolved-to-a-variable) – Phantômaxx Oct 26 '14 at 09:24
  • @Panther how to clean and rebuild the project, whether to refresh project? my IDE is eclipse, an i build a system android. – user3001890 Oct 26 '14 at 12:51
  • what's your main about possibla duplicate, i not understand @Funkystein – user3001890 Oct 26 '14 at 12:52
  • 1
    Check the linked post – Phantômaxx Oct 26 '14 at 13:42
  • if you can use teamviewer or something for remote access...i may help – Atish Agrawal Oct 26 '14 at 17:37

1 Answers1

0
package testMail;

public class testMail {

    public static void main(String[] args)throws Exception {
        String hostname="smtp.example.com";
        int port=2525;
        String username="nawale.pandu@gmail.com";
        String password="kskcpz09";
        Mailer mailer=new Mailer(hostname,port,username,password);
        /* error  
    Multiple markers at this line
    - Mailer cannot be resolved 
     to a type
    - Mailer cannot be resolved 
     to a type */
    }

}
d6bels
  • 1,432
  • 2
  • 18
  • 30