Issue
I am developing a native script app using angular, and I need to access the native Android API. I tried to use android.view
as mentioned in the native script documentation, but I get an error saying that view is not defined : Native Script documentation
Here below is the declaration used to access the android object.
import { android } from "application";
Can you help me please to find out why am I getting this error ?
Solution
You don't have to import anything to access the native APIs. So to use android.view
you'd just call it in your app like this:
const x = new android.view.ViewGroup.... // or whatever you're accessing
Answered By - Brad Martin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.