Error apk architecture


#1

I am having this error when I am running ionic run android
(he can see my samsung device)

if someone can really help many thanks!!

C:\ionic\todo\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error: Could not find apk architecture: arm build-type: debug
at Object.module.exports.findBestApkForArchitecture (C:\ionic\todo\platforms
\android\cordova\lib\build.js:466:11)
at C:\ionic\todo\platforms\android\cordova\lib\device.js:99:30
at _fulfilled (C:\ionic\todo\platforms\android\cordova\node_modules\q\q.js:7
98:54)
at self.promiseDispatch.done (C:\ionic\todo\platforms\android\cordova\node_m
odules\q\q.js:827:30)
at Promise.promise.promiseDispatch (C:\ionic\todo\platforms\android\cordova
node_modules\q\q.js:760:13)
at C:\ionic\todo\platforms\android\cordova\node_modules\q\q.js:526:49
at flush (C:\ionic\todo\platforms\android\cordova\node_modules\q\q.js:108:17
)
at process._tickCallback (node.js:355:11)


#2

+1 Getting a successful build, but when throws this error when attempting to install to the device. I’m running the HTC One M8 on Android 5.0.1.

Also note that if I install the apk manually, it works.


#3

I was having the same issue and finally got it resolved.

This seems to have something to do with the generated apks, which can be found in /platforms/android/build/outputs/apk

When I run ‘ionic build android’ it generates android-debug.0.0.23.apk and android-debug-unaligned.0.0.23.apk - containing a version number suffix. If I then run ‘ionic run android --device’ it generates android-debug.apk and android-debug-unaligned.apk but fails with the ‘Error: Could not find apk architecture: arm build-type: debug’ issue mentioned above.

In order to get the app to run successfully, I just had to delete the apks with the version number suffix. Then, I was able to run ‘ionic run android --device’ again and the app was installed on my device.

Hope this helps!


#4

I was recently struggling with this same error and wanted to chime in with what worked for me.

In my case, I was simply missing these paths from my PATH environment variable:
C:\Users<username>\AppData\Roaming\npm\node_modules\cordova\bin
C:\Program Files\nodejs\node_modules\npm\bin


#5

Hi were you able to find any stable solution.?
Facing the same issue