Results 1 to 3 of 3
  1. #1
    naipulb is offline Member
    Join Date
    Apr 2008
    Posts
    4
    Rep Power
    0

    Default How to import a package in Eclipse?

    Hi.

    I want to use the code from the following website:

    davanum.wordpress.com/2007/12/22/android-send-email-via-gmail-actually-via-smtp/

    It starts with:

    Java Code:
    package org.apache.android.mail;
    
    import android.app.Activity;   
    import android.os.Bundle;   
    import android.util.Log;   
    import android.view.View;   
    import android.widget.Button;   
    import android.widget.EditText;
    I've downloaded a ZIP-file from the website. It contained 2 JAR-files and a lot of other files. I added the Jar-files to the Classpath.. but in vain. On the first line, Eclipse tells me:

    The declared package "org.apache.android.mail" does not match the expected package ""
    And on the other lines I am told:

    The import android cannot be resolved
    Can somebody please tell me what to do :confused:

  2. #2
    Hex_uk is offline Member
    Join Date
    Jun 2008
    Posts
    1
    Rep Power
    0

    Default

    Hi,

    Looking at the code I guess this is for the Google Android phone. The zip only contains mail and activation jars. You will probably need to install the Google Android emulator and SDK before you will be able to use this code.

    Ben.

  3. #3
    naipulb is offline Member
    Join Date
    Apr 2008
    Posts
    4
    Rep Power
    0

Similar Threads

  1. error with import java.io.*
    By osval in forum New To Java
    Replies: 5
    Last Post: 05-13-2010, 05:03 PM
  2. How to import java project to Eclipse?
    By techissue2008 in forum Eclipse
    Replies: 1
    Last Post: 05-30-2008, 10:07 PM
  3. Combine package of(jdk,eclipse and tomcat)
    By joseph in forum Eclipse
    Replies: 0
    Last Post: 04-07-2008, 01:18 PM
  4. import statement.
    By diRisig in forum New To Java
    Replies: 2
    Last Post: 02-08-2008, 12:34 AM
  5. I can't import javax.mail
    By katie in forum New To Java
    Replies: 2
    Last Post: 08-04-2007, 05:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •