I ran into the "not allowed to have over a 240 characters folder name" Windows problem building my android project.
I found a solution in this thread. Among all the proposition I've chosen to implement @lodlock's answer consisting in modifying the gradle.build file as follow:
allprojects {
buildDir = "C:/tmp/${rootProject.name}/${project.name}"
repositories {
...
} }
It does work for the build. But afterward when Android-Studio try to install the file "android-debug.apk" it does not find it at the expected location [project location] because the build is located "C:/tmp/${rootProject.name}/${project.name}". It gives me the following error:
11/10 18:32:23: Launching android The APK file [my android project folder]\build\outputs\apk\android-debug.apk does not exist on disk. Error while Installing APK
I can workaround it by taking the "android-debug.apk" file from "C:/tmp/${rootProject.name}/${project.name}/outputs/apk" and by copying it at the expected location ("[my android project folder]\build\outputs\apk\").
But this is not efficient, hence I'd like to know how to set where to pick the installing APK location in gradle.build (or anywhere else)?
Any ideas?
Some update: Restarting Android-studio and rebooting the computer (also I am not certain the reboot is relevant). Made it work. No change to do, I just clicked "Run" on Android-studio and it seems that this time it was picking the apk from the correct location where it had been built ("C:/tmp/${rootProject.name}/${project.name}/outputs/apk"). Also, I use ionic2, and when I try to launch it in 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
With Android-studio opened next to it, I can use it to run it.