# Custome Capacitor plugins doesn't work on android .apk build

**URL:** <https://forum.ionicframework.com/t/custome-capacitor-plugins-doesnt-work-on-android-apk-build/230623>\
**Category:** Capacitor\
**Created:** [January 27, 2023, 3:33am UTC](https://forum.ionicframework.com/t/custome-capacitor-plugins-doesnt-work-on-android-apk-build/230623 "2023-01-27T03:33:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![estebanovic](https://avatars.discourse-cdn.com/v4/letter/e/a587f6/32.png) [@estebanovic](https://forum.ionicframework.com/u/estebanovic)\
**Post date:** [January 27, 2023, 3:33am UTC](https://forum.ionicframework.com/t/custome-capacitor-plugins-doesnt-work-on-android-apk-build/230623/1 "2023-01-27T03:33:46Z")

</div>

I built a couple of plugins with capacitor to use native android features in my project (Ionic v6). They work fine when I test it with the command `ionic cap run android -l --external`, but when I build an apk and install it they don’t work.

I tried adding the plugin class in the onCreate, as follows, but doesn’t work.  
package cl.dcanje.pos;

```auto
import android.os.Bundle;

import com.getcapacitor.BridgeActivity;
import com.dcanje.plugins.nativeclick.NativeClickPlugin;

public class MainActivity extends BridgeActivity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    registerPlugin(NativeClickPlugin.class);
  }
}

```

Here you can see the output when I call the function, using the live reload

 ![Captura9](https://global.discourse-cdn.com/ionicframework/original/3X/a/b/ab8da116de3bf4852d812961505425432853b7af.png)

and when I do it from the apk.

 ![Captura8](https://global.discourse-cdn.com/ionicframework/original/3X/d/b/db62b7a748b6e702eb6cf1705b70980abbf74d00.png)
