问题
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