1

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.

Community
  • 1
  • 1
nyluje
  • 3,573
  • 7
  • 37
  • 67
  • Can you provide your gradle logs or if necessary android studio's log files for further details? If need be you are welcome to contact me directly. – lodlock Nov 12 '16 at 07:51
  • Hi, I have trouble to find the log that should be generated somewhere when I do a "ionic run android", I've opened a thread on Ionic forum about it: https://forum.ionicframework.com/t/error-could-not-find-apk-architecture-arm-build-type-debug-on-ionic-2-cli-ionic-run-android-where-are-the-logs-files-located/70039 – nyluje Nov 13 '16 at 13:36

0 Answers0