Recently I created a web app using react js. it's an admin panel. i used local storage to store some login information (as token).
but when i work on convert to apk using android studio i got error below.
"TypeError: Cannot read properties of null (reading 'getItem')"
how can i fix this ?
Related
We have developed an application with react native expo and when we upload the application to the google store the application freezes and does not run. After some research we tried to run our application with Android studio and we get the following error
“com.android.bundle.errors.EvalIssueException: The android Grandle plugin only kotlin-android extension Grandle plugin version. The following dependencies do not satisfy the required verssion:
Project ‘:expo’ -> org.jetbrain.kotlin:kotlin-grandle-plugin:1.6.10
”
The error is most probably occurred because the application is using expo and does not build react native in a native environment. Does any body know how we can solve this problem. Should we change from react native expo to bare react native?
We uploaded successfully the application to the google store and after we download it to our mobile phone, the application did not load and freezed in a white screen. Also the application does not run with android studio and we can not fix this problem.
I have a VueJS project with a "fakeDB.js" file that drives the database via local storage (browser) during development. After testing this locally, everything is working and I can navigate to pages perfectly fine.
I'm now running npm run build to get the js/css files to place into a Cordova application for an Android application. After copying these files into the application and switching the VueJS application to use the SQLITE3 inside Cordova I experience issues.
My login pages work perfectly fine, I can view the dashboard with all the jobs inside it but if I click into a job it throws a white screen.
After hooking up adb debug, all I can see is an error in the chunk-vendor file that npm run build created which, AFAIK, contains the vendor packaging.
The error message I get is:
"TypeError: Cannot read property 'substr' of undefined", source: file:///android_asset/www/js/chunk-vendors.f024a0c1.js (7)
Of course, this file is obfuscated and minified so Line 7 is VueJS 2.6.12.
I have inherited this application with no previous experience so I'm taking an educated guess around "chunk-vendor" that I perhaps need to upgrade the depedencies surrounding this application to get past this issue but I'm unsure how I can debug this further inside of android studio.
How can I go about solving this issue? Is there a way to upgrade safely inside of npm?
Update: I have ran a npm update and I'm now on VueJS 2.7.10 but still getting the same issue
I am using react-native-fbsdk-next(version 4.6.0) in my react native project. I followed the docs accordingly but then it started giving me following error since yesterday.
I checked the other answers which suggest adding the string in the manifest file but that has already been added.
I have tried to integrates react-native with an existing android app.I followed Official guide.When everything was done. I started the development server then run my android app.I got the following error.
In genymotion
In chrome console.
How to solve this problem.Thanks for any suggestion.
I am using PHONEGAP - CORDOVA.
Why do I get this error?
Uncaught TypeError: Cannot read property 'capture' of undefined
at this line:
navigator.device.capture.captureImage();
The project only imports cordova.js and index.js. I am just trying to open gallery on android with a simple button.
Should I import another file to this project?
Thanks!
In order for this to work you will need to add the Cordova media-capture plugin to your project as documented here.