Android-studio: Failed to kill the file? & # 8594; Modify build.gradle to fix this problem & # 8594; Error installing APK

I came across the fact that "it is not allowed to have more than 240 characters of the folder name." Problem with windows creating my android project.

I found a solution in this thread. Among all the suggestions that I have chosen to implement the @lodlock answer, is to modify the gradle.build file as follows:

allprojects { buildDir = "C:/tmp/${rootProject.name}/${project.name}" repositories { ... } } 

It works for assembly . But after , when Android-Studio tries to install the โ€œandroid-debug.apkโ€ file, it does not find it in the expected location [project location], because the assembly is located โ€œC: / TMP / $ {rootProject.name} / $ {project .name} ". This gives me the following error:

11/10 18:32:23: Starting android. APK file [my android project folder] \ build \ output \ apk \ android-debug.apk does not exist on the disk. Error installing APK

I can get around this by taking the file "android-debug.apk" from "C: / tmp / $ {rootProject.name} / $ {project.name} / output / apk" and copying it with the expected location ("[my project Android folder] \ build \ outputs \ APK \ ").

But this is not effective, so I would like to know how to install, where to choose where to install the APK in gradle.build (or somewhere else)?

Any ideas?

Some update: Rebooting Android-studio and rebooting the computer (also I'm not sure if the reboot is relevant). Did the job. To make no changes , I just clicked โ€œRunโ€ on Android-studio, and it seems that this time he chose apk from the right place where it was built ("C: / tmp / $ {rootProject.name} / $ {project .name} / exits / APK "). In addition, I use ionic2, and when I try to run it in the CLI with ionic run android , it builds, but it cannot run it on the device, I get:

Error: could not find apk architecture: arm build-type: debug

When Android Studio opened next to it, I can use it to launch it.

+1
android windows android-studio ionic2
Nov 10 '16 at 17:45
source share

No one has answered this question yet.

See similar questions:

66
Error: the file path in the windows is too long, below 240 characters

or similar:

947
Android Studio: add jar as a library?
703
How to install apk file in android emulator?
687
Android error: Failed to install * .apk on device *: timeout
374
Android Application Not Installed Error
351
Installing Android Studio on Windows 7 failed, JDK not found
220
APK file does not exist on disk
172
Installation error with message Invalid file
106
Difference between app-debug.apk and app-debug-unaligned.apk
64
Where is Android studio located for my .apk file?
22
Getting "Package seems damaged" error when installing apk file



All Articles