Where is my APK stored when i run program on a android device?

不问归期 提交于 2019-12-13 18:41:27

问题


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)?

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


回答1:


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

Does Android keep the .apk files? if so where?

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]);

        }
    }



回答2:


Its in /bin/ directory in your project path




回答3:


It is in your bin folder bin/appname.apk



来源:https://stackoverflow.com/questions/25462916/where-is-my-apk-stored-when-i-run-program-on-a-android-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!