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

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

问题描述

我之前问过一个类似的

我选择了选项:导出 Android 应用程序,然后我收到一条消息,指出我尝试导出的项目不是 Android 项目.这真的很令人困惑,我参加了 android 开发课程,我尝试转换为 apk 的项目是我创建的第一个项目.下面的截图是我看到的消息;

当我点击浏览按钮时,我得到的只是一个新窗口,但没有填充任何内容.我需要帮助/指导人,因为我正在学习 android 开发,但我仍然是一个菜鸟 :(

解决方案

看起来像:

  1. 您的项目尚未打开

<块引用>

在包资源管理器中右键单击项目名称> 打开项目

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

<块引用>

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

  1. 您的项目可能尚未导入 Eclipse.为此,打开包资源管理器并将您的项目添加到其中:

查看包浏览器:

<块引用>

窗口 > 显示视图 > 包浏览器

导入新项目:

<块引用>

New > Project... > Android Project from Existing Code > [Look for rootAndroid项目的目录,应该是包含的根目录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天全站免登陆