简体   繁体   English

在Android手机上的哪里可以找到apk文件?

[英]Where can I find the apk file on my Android phone?

I am trying to develop android applications with eclipse (following this tutorial ). 我正在尝试使用Eclipse开发android应用程序(在本教程之后 )。 Clicking the 'Run' button inside eclipse (running on Linux) and choosing an android device, eclipse tells me that the application is successfully installed on the device. 单击eclipse中的“运行”按钮(在Linux上运行)并选择一个android设备, eclipse告诉我该应用程序已成功安装在设备上。

[2014-07-02 19:26:55 - MyFirstApp] Installing MyFirstApp.apk...
[2014-07-02 19:27:01 - MyFirstApp] Success!
[2014-07-02 19:27:02 - MyFirstApp] /MyFirstApp/bin/MyFirstApp.apk installed on device
[2014-07-02 19:27:02 - MyFirstApp] Done!

However, I cannot find this application in the list of installed applications on the phone. 但是,我在手机上已安装的应用程序列表中找不到该应用程序。 It only shows up in Settings -> Applications where I am only able to remove it, but not to start it. 它仅显示在“设置”->“应用程序”中,在那里我只能将其删除,而无法启动它。 Maybe I need to do something special in order to let the app show up normally and useable? 也许我需要做一些特别的事情才能使应用正常显示和可用?

As a next step, I installed an 'AppInstaller' to install the apk file. 下一步,我安装了一个“ AppInstaller”来安装apk文件。 But I do now know which folder on the android phone the apk has been copied to. 但我现在知道apk已复制到Android手机上的哪个文件夹。 Where did eclipse put the apk in? 蚀把apk放在哪里?

This is in the manifest: 这在清单中:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.myfirstapp"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="21" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
    </application>

</manifest>

The most likely cause is that you didn't specify a launcher activity in the Manifest. 最可能的原因是您没有在清单中指定启动器活动。

<activity android:name="... >
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

From the documentation : 文档中

  • The ACTION_MAIN action indicates this is the main entry point and does not expect any intent data. ACTION_MAIN操作指示这是主要入口点,不希望有任何意图数据。
  • The CATEGORY_LAUNCHER category indicates that this activity's icon should be placed in the system's app launcher. CATEGORY_LAUNCHER类别指示此活动的图标应放置在系统的应用启动器中。 If the element does not specify an icon with icon, then the system uses the icon from the element. 如果元素未使用图标指定图标,则系统将使用元素中的图标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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