question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Statusbar plugin got error in Andriod Studio: Line 2 - Msg: Error: "StatusBar" plugin is not implemented on android

See original GitHub issue

Bug Report

Capacitor Version

Capacitor Doctor

Latest Dependencies:

@capacitor/cli: 2.4.6 @capacitor/core: 2.4.6 @capacitor/android: 2.4.6 @capacitor/ios: 2.4.6

Installed Dependencies:

@capacitor/ios: not installed @capacitor/cli: 3.0.0-beta.1 @capacitor/core: 3.0.0-beta.1 @capacitor/android: 3.0.0-beta.1

[success] Android looking great!

E/Capacitor/Console: File: http://localhost:8100/static/js/4.a14c6c57.chunk.js - Line 2 - Msg: Error: “StatusBar” plugin is not implemented on android E/Capacitor: JavaScript Error: {“type”:“js.error”,“error”:{“message”:“Uncaught Error: "StatusBar" plugin is not implemented on android”,“url”:“http://localhost:8100/static/js/4.a14c6c57.chunk.js",“line”:2,“col”:178972,“errorObject”:"{\“code\”:\“UNIMPLEMENTED\”}”}} E/Capacitor/Console: File: http://localhost:8100/static/js/4.a14c6c57.chunk.js - Line 2 - Msg: Uncaught Error: “StatusBar” plugin is not implemented on android

Platform(s)

Andriod Studio

Current Behavior

I am coding by using “@capacitor/core”: “^3.0.0-beta.1” and “@capacitor/status-bar”: “^0.4.0”, follow the document, i added below two lines to index.tsx:

import { StatusBar } from ‘@capacitor/status-bar’; StatusBar.setOverlaysWebView({ overlay: true });

, then, ionic build -> npx cap sync -> run in Android Studio, and got this error.

E/Capacitor/Console: File: http://localhost:8100/static/js/4.a14c6c57.chunk.js - Line 2 - Msg: Error: “StatusBar” plugin is not implemented on android E/Capacitor: JavaScript Error: {“type”:“js.error”,“error”:{“message”:“Uncaught Error: "StatusBar" plugin is not implemented on android”,

Expected Behavior

Display content under transparent status bar in Andriod

Code Reproduction

`import React from ‘react’; import ReactDOM from ‘react-dom’; import App from ‘./App’; import * as serviceWorker from ‘./serviceWorker’;

import { StatusBar } from ‘@capacitor/status-bar’; StatusBar.setOverlaysWebView({ overlay: true });

ReactDOM.render(<App />, document.getElementById(‘root’));

// If you want your app to work offline and load faster, you can change // unregister() to register() below. Note this comes with some pitfalls. // Learn more about service workers: https://bit.ly/CRA-PWA serviceWorker.unregister();`

Other Technical Details

npm --version output: 6.13.4

node --version output: v12.16.1

pod --version output (iOS issues only):

Additional Context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
imhoffdcommented, Feb 2, 2021

Looks like there’s already an issue for it: https://github.com/ionic-team/capacitor/issues/739

1reaction
imhoffdcommented, Feb 2, 2021

Interesting. We should probably check that the built-in code shrinker for Android doesn’t remove plugin classes that it thinks are “unused”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Android Issues | Capacitor Documentation
If you have installed a new Plugin from npm and are unable to use or see the plugins in your Android build, try...
Read more >
Toggle the notification bar in android - Stack Overflow
You need to enable the EXPAND_STATUS_BAR permission in AndroidManifest.xml . try { Object sbservice = getSystemService("statusbar"); Class<?> statusbarManager = ...
Read more >
Emulator release notes - Android Developers
Tested with Android Studio Bumblebee Patch 1 and Chipmunk Canary 6. This update includes the following fix: [Bug fix] Emulator hanging error on...
Read more >
cordova-plugin-inappbrowser
This plugin provides a web browser view that displays when calling cordova. ... set to yes to show Android browser's zoom controls, set...
Read more >
flutter_native_splash | Flutter Package - Pub.dev
This attribute is only found in Android 12, so if you are getting this error, it means your project is not fully set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found