-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Currently I am having an issue, where users had JIT version of the app. Now I have released an AOT version, but when people update their app, it immediately crashes:
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException:
Error calling module function
Error: com.tns.NativeScriptException: Failed to find module: "ui/frame/activity", relative to: app/tns_modules/
It is because AOT does not have tns_modules folder there by idea. If one clears its app data, the app works fine. I guess the app is storing some sort of startup code in app data. Is there a way to programmatically or in some preferences specify, for an app to clear app data?
There is something like this: PreferenceManager.getDefaultSharedPreferences(context).edit().clear().apply();
But where do I put it in my code? The app crashes at startup screen, without getting to the first component.