Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android tutorial - tvWidget is not defined #76

Open
Sotatek-HieuVu opened this issue Dec 11, 2022 · 0 comments
Open

Android tutorial - tvWidget is not defined #76

Sotatek-HieuVu opened this issue Dec 11, 2022 · 0 comments

Comments

@Sotatek-HieuVu
Copy link

Is there any tutorial about how to implement this one in Android or iOS (or both)? I tried to combine the charting-library-example and this tutorial, but it completely did not work. I keep receiving errors:

I/chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Cannot use import statement outside a module", source: file:///android_asset/charting_library/src/datafeed.js (1)
I/chromium: [INFO:CONSOLE(1)] "Uncaught SyntaxError: Cannot use import statement outside a module", source: file:///android_asset/charting_library/src/main.js (1)
I/chromium: [INFO:CONSOLE(2)] "Uncaught ReferenceError: tvWidget is not defined", source: file:///android_asset/charting_library/index.html (2)

Here is how I did it:

  1. Clone an example of Android in charting-library-example
  2. Add folder charting_library into the source code that I just cloned
  3. Add folder src of this tutorial into the source code
  4. Copy the content of a file index of this tutorial and replace it into file index.js in the source code
  5. Run the source code (in both the emulator and real device)

Here is what my source code looks like after I finish all steps:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant