在Android设备上运行程序时,APK存放在哪里? [英] Where is my APK stored when i run program on a android device?

查看:146
本文介绍了在Android设备上运行程序时,APK存放在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我通过设备上的Eclipse运行我的程序时,它会被安装(因为我可以从我的应用程序浏览器中再次打开它).但是我在任何地方都找不到.APK.有没有一种方法可以预先确定我的.APK去向?否则,如何从应用程序浏览器中找到应用程序的文件夹(使用galaxy s4)?

When i just run my program through eclipse on my device it gets installed (since i can open it again from my apps browser). However i cannot find the .APK anywhere. Is there a way to pre determine where my .APK goes? Otherwise how can i find the folder of an app from the app browser (using galaxy s4)?

我尝试使用ES文件浏览器应用搜索文件而没有结果.

I have tried searching for files using the ES file explorer app without results.

推荐答案

在您的Eclipse中,它将位于/bin文件夹下.
在您的设备中,您的应用程序将位于/data/app文件夹中.

In your Eclipse, it will be under the /bin folder.
In your device, your app will be in /data/app folder.

Android是否保留.apk文件?如果可以的话,在哪里?

在您的应用中尝试以下代码:

Try this code in your app:

public class Testing extends Activity {
    private static final String TAG = "TEST";
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        File appsDir = new File("/data/app");

        String[] files = appsDir.list();

        for (int i = 0 ; i < files.length ; i++ ) {
            Log.d(TAG, "File: "+files[i]);

        }
    }

这篇关于在Android设备上运行程序时,APK存放在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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