0

When i select a project (File->new->Android Project-> From existing source) to import am getting the error

[2012-09-24 22:18:41 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Unable to read E:\android-sdk\AndroidManifest.xml: java.io.FileNotFoundException: E:\android-sdk\AndroidManifest.xml (The system cannot find the file specified)

also am getting the error After importing the project

[2012-09-24 22:21:02 - SplashScreen] Project has no default.properties file! Edit the project properties to set one.

Also am getting errors on the import statements.

import java.io, java.nio, java.util, org.apache.http.HttpResponce, org.apache.http.Version, org.apache.http.client, org.apache.http.conn,org.apache.http.impl, org.apache.http.params, android,.. etc

Please help me.

G M Ramesh
  • 3,420
  • 9
  • 37
  • 53

3 Answers3

1

Right Click on projec-->properties-->Android-->Selct any porject build target like 2.3.3 or 4.0.3 than apply , clean your project and than build the project.. i hope it may generate

G M Ramesh
  • 3,420
  • 9
  • 37
  • 53
  • that means it needs some jar file, it seems that you need some apche jar file to get rid those import errors or else your importing project only has some missing files – G M Ramesh Sep 29 '12 at 04:32
  • Tere is the jar file. I have added the apche jar file, Ksoap to that project. –  Sep 29 '12 at 04:38
  • than go to java build path and than click on libraries option check the two jar files which u added and than clean the prjt, build the prjt – G M Ramesh Sep 29 '12 at 04:40
  • I have done that. But i cannot resolve the error on the import statements. –  Sep 29 '12 at 04:44
1

Are you missing the manifest.xml file or can you locate it yourself and copy it into the project? You can create a new one yourself. Also, it looks like you're creating a project in the android-sdk folder. Not a good idea if the android sdk really is located there.

Andy Harris
  • 928
  • 5
  • 10
  • Manifest.xml is not missing it is there in the project. AM getting the error on the import statements –  Sep 29 '12 at 04:26
  • Have you gotten other Android projects to work on that machine? If not, make sure you follow all of the steps found here: http://developer.android.com/sdk/installing/index.html It sounds like your path is not set correctly if it's not finding the imports. – Andy Harris Sep 29 '12 at 04:28
  • Other projects are working. I can create new projects and also can import projects. But the problem is for one project. Its working on other machine.. –  Sep 29 '12 at 04:33
  • Try right clicking on the project and select Android Tools > Fix Project Properties. The project is looking in the wrong spot for the library file. – Andy Harris Sep 29 '12 at 04:56
  • Taken from paislee's answer here: http://stackoverflow.com/questions/4404553/missing-androidmanifest-xml-when-importing-an-old-android-project-into-eclipse. "Eclipse thinks the default location for new Android projects is the Android SDK path... 1)File -> New -> Android Project 2)Un-check 'Use default location' and browse to project root directory. 3)Click 'Create project from existing source' It's important to do step (2) before (3) otherwise the error persists and prevents running the project." – Andy Harris Sep 29 '12 at 05:12
1

If none of the above answers work then try following manual way to add default.properties.

  • Go to your project folder.
  • Right click and create a new text file
  • Add following code

    # This file is automatically generated by Android Tools.
    # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
    #
    # This file must be checked in Version Control Systems.
    #
    # To customize properties used by the Ant build system use,
    # "build.properties", and override values to adapt the script to your
    # project structure.
    
    # Project target.
    target=android-4
    
  • Change target=android-4 according to your android version

  • Save and Exit.
  • Rename file text file to default.properties
  • Go to your eclipse and refresh the project

however this should be the last option. One more way copy default.properfies from any other project and paste in current project, it will also work.

Lucifer
  • 29,392
  • 25
  • 90
  • 143