通过eclipse创建一个apk [英] creating an apk via eclipse

查看:187
本文介绍了通过eclipse创建一个apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我早些时候提出了类似的



我选择选项:导出Android应用程序后,我收到一个消息,我正在尝试导出的项目不是一个Android项目。这真的令人困惑,我采取了一个Android开发课程,我正在尝试转换为一个apk是我创建的第一个项目之一。以下截图是我看到的消息;



当我点击浏览按钮,我得到的是一个新窗口,但没有任何内容它。我需要帮助/指导,因为我正在学习Android开发,而我还是一个菜鸟:(





解决方案

/ p>


  1. 您的项目尚未打开




在Package Explorer中打开项目名称右键单击





  1. 您的项目可能已被意外标记为图书馆项目(图书馆项目无法导出为apk文件)




右键单击包资源管理器中的项目名称>属性> Android>库复选框




  1. 您的项目可能尚未导入到Eclipse中。要这样做,
    打开包资源管理器并添加您的项目:

要查看软件包资源管理器:


窗口>显示视图>软件包Exporer


要导入新项目:


新建>项目...>现有代码中的Android项目> [查找Android的root
目录项目,应该是包含
的根目录 AndroidManifest.xml 文件]>选择要导入的项目(如果
正确上一步,你应该只需查看一个)>选择
将项目复制到工作空间(如果要在
工作区文件夹中创建副本,否则请确保您的项目文件不会从现有目录中移动
)>完成





  1. 您的项目可能已被意外配置为Java项目而不是Android应用程序项目,如果看到


    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 :(

    解决方案

    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:

    这篇关于通过eclipse创建一个apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆