简体   繁体   中英

creating an apk via eclipse

I asked a similar question earlier and I followed the instructions I was given in the answer . Now I get the android option, which I was not getting earlier, as per the image below 出口选择

I select the option: Export Android Application after which I get a message that the project I am trying to export is not an Android project. This is really confusing and I took an android development course and the project I am trying to convert to an apk is one of the first i created. The following screenshot is the message I see; 选择要导出的项目

When I click on the browse button all i get is a new window but nothing gets populated in it. I need help/guidance people as I am learning android development and I am still a rookie :(

屏幕截图1

屏幕截图2

I don't think yours is an Android project but it a Java project. It uses JRE to compile so it is a Java project. You are trying to export Android application from Java project.

Looks like either:

  1. Your project isn't opened yet

Right click on project name in Package Explorer > Open Project

  1. Your project may have been accidentally marked as a Library project (library projects cannot be exported as apk files)

Right click on project name in Package Explorer > Properties > Android > "Is Library" checkbox

  1. Your project may not have been imported into Eclipse yet. To do so, open package explorer and add your project into it:

To view package explorer:

Window > Show View > Package Exporer

To import new project:

New > Project... > Android Project from Existing Code > [Look for root directory of the Android project, should be the root dir containing the AndroidManifest.xml file] > Select project to import (if you have the previous step correctly you should only see one) > Select Copy projects into workspace (if you want to create a copy in your workspace folder, otherwise ensure that your project files don't move out of your existing directory) > Finish

  1. Your project may have been accidentally been configured as a Java project instead of an Android application project, if so see this SO question .

If that's not the reason why you are not seeing any projects, please let me know and provide more information (perhaps also a screenshot of your entire IDE with the Java perspective).


This is what the project properties panel should look like:

资源,Android,Android Lint首选项,构建器,Java构建路径,Java代码样式,Java编译器,Java编辑器,Javadoc位置,项目引用,重构历史记录,运行/调试设置,任务存储库,任务标签,验证,WikiText

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM