# Ionic not make apk

**URL:** <https://forum.ionicframework.com/t/ionic-not-make-apk/187502>\
**Category:** cordova\
**Created:** [April 17, 2020, 12:57pm UTC](https://forum.ionicframework.com/t/ionic-not-make-apk/187502 "2020-04-17T12:57:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nexoone7](https://avatars.discourse-cdn.com/v4/letter/n/e480ec/32.png) [@nexoone7](https://forum.ionicframework.com/u/nexoone7)\
**Post date:** [April 17, 2020, 12:57pm UTC](https://forum.ionicframework.com/t/ionic-not-make-apk/187502/1 "2020-04-17T12:57:25Z")

</div>

> cordova.cmd build android  
> Checking Java JDK and Android SDK versions  
> ANDROID\_SDK\_ROOT=C:\Users\hp\AppData\Local\Android\Sdk (recommended setting)  
> ANDROID\_HOME=C:\Users\hp\AppData\Local\Android\Sdk (DEPRECATED)  
> Cannot read property ‘length’ of undefined  
> [ERROR] An error occurred while running subprocess cordova.

```
    cordova.cmd build android exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.

```

any one help me plz to solve this issue whats wrong ??

---

<div class="post-metadata">

**Author:** ![Konwo](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/konwo/32/132110_2.png) [@Konwo](https://forum.ionicframework.com/u/Konwo)\
**Post date:** [April 17, 2020, 1:52pm UTC](https://forum.ionicframework.com/t/ionic-not-make-apk/187502/2 "2020-04-17T13:52:46Z")

</div>

Check JDK on your machine or update the path on your machine enviroment, you can check on stackoverflow how to do that.

---

<div class="post-metadata">

**Author:** ![starlley](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/starlley/32/134565_2.png) [@starlley](https://forum.ionicframework.com/u/starlley)\
**Post date:** [April 17, 2020, 11:57pm UTC](https://forum.ionicframework.com/t/ionic-not-make-apk/187502/3 "2020-04-17T23:57:01Z")

</div>

The erro is telling you…

Is a `Cannot read property ‘length’ of undefined`

In your code have one variable that is in error!

☹
