0

We're trying Facebook's accountkit to let our Android users signin with their phone number.

When a user clicks on a button to open the login screen, we get the following error:

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.accountkit.R$attr" on path: DexPathList[[zip file "/data/app/XXX.XXX-2/base.apk"],nativeLibraryDirectories=[/data/app/XXX.XXX-2/lib/arm, /data/app/XXX.XXX-2/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]

The code of the button is:

    final Intent intent = new Intent(activity, AccountKitActivity.class);
              AccountKitConfiguration.AccountKitConfigurationBuilder configurationBuilder =
                new AccountKitConfiguration.AccountKitConfigurationBuilder(
                  LoginType.PHONE,
                  AccountKit

Activity.ResponseType.CODE); // or .ResponseType.TOKEN
          // ... perform additional configuration ...
          intent.putExtra(
            AccountKitActivity.ACCOUNT_KIT_ACTIVITY_CONFIGURATION,
            configurationBuilder.build());
          startActivityForResult(intent, APP_REQUEST_CODE);

          AccountKit.getCurrentAccount(new AccountKitCallback<Account>() {
                @Override
                public void onSuccess(final Account account) {
                    String accountKitId = account.getId();
                    PhoneNumber phoneNumber = account.getPhoneNumber();
                    String phoneNumberString = phoneNumber.toString();

                    Log.e("ACCOUNT KIT : phone number",":"+phoneNumberString);
                }

                @Override
                public void onError(final AccountKitError error) {
                    // Handle Error
                }
            });

Could you please help?

Thanks

jennie788
  • 396
  • 3
  • 18

1 Answers1

0

just change AccountKitActivity.ResponseType.CODE); to AccountKitActivity.ResponseType.TOKEN);

Akash Shah
  • 15
  • 4