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.content.res.Resources$NotFoundException: #140

Open
khaledhamdansd opened this issue Jan 9, 2020 · 1 comment
Open

android.content.res.Resources$NotFoundException: #140

khaledhamdansd opened this issue Jan 9, 2020 · 1 comment

Comments

@khaledhamdansd
Copy link

got this error on 3.Huawei Honor 8A (HWJAT-M), Android 9 Report 1 of 5:

java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3430)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3614)
at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:86)
at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2199)
at android.os.Handler.dispatchMessage (Handler.java:112)
at android.os.Looper.loop (Looper.java:216)
at android.app.ActivityThread.main (ActivityThread.java:7625)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:987)
Caused by: android.content.res.Resources$NotFoundException:
at android.content.res.Resources.getText (Resources.java:430)
at android.content.res.HwResources.getText (HwResources.java:463)
at android.content.res.Resources.getString (Resources.java:523)
at android.app.Fragment.getString (Fragment.java:796)
at com.cordova.plugin.android.fingerprintauth.a.onCreateView (SourceFile:86)
at android.app.Fragment.performCreateView (Fragment.java:2537)
at android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1301)
at android.app.FragmentManagerImpl.moveFragmentToExpectedState (FragmentManager.java:1581)
at android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1643)
at android.app.FragmentManagerImpl.dispatchMoveToState (FragmentManager.java:3054)
at android.app.FragmentManagerImpl.dispatchActivityCreated (FragmentManager.java:3006)
at android.app.FragmentController.dispatchActivityCreated (FragmentController.java:182)
at android.app.Activity.performCreate (Activity.java:7465)
at android.app.Activity.performCreate (Activity.java:7448)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1286)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3409)

@mcendon
Copy link

mcendon commented Mar 11, 2020

Hi. Im having the same error reports

A similar problem was solved here NiklasMerz/cordova-plugin-fingerprint-aio#158 and it was solved with this piece of code:
okode/cordova-plugin-fingerprint-aio@6b4fd9f

I adapted it to this plugin this way:
Adding this method to the FingerprintAuthenticationDialogFragment.java

    public static boolean isPluginSetUp() {
        return FingerprintAuth.packageName != null;
    }

and these lines inside the onCreateView method:

        if (!FingerprintAuthenticationDialogFragment.isPluginSetUp()) {
            Log.i(TAG, "Invalid state, view not created");
            dismissAllowingStateLoss();
            return null;
        }

It should be like:

public static boolean isPluginSetUp() {
        return FingerprintAuth.packageName != null;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        if (!FingerprintAuthenticationDialogFragment.isPluginSetUp()) {
            Log.i(TAG, "Invalid state, view not created");
            dismissAllowingStateLoss();
            return null;
        }

I have not tested it yet but it should work

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

2 participants