Это моя проблема:< /p>
Вызвано: java.lang.ClassNotFoundException: не найден класс «java.awt.Desktop» по пути: DexPathList[[zip-файл "/data/app/com.retrofitdemo-1/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
Это мой код:
Код: Выделить всё
private static final GoogleClientSecrets googleSecrets = new GoogleClientSecrets();
googleSecrets.setInstalled(
new GoogleClientSecrets.Details()
.setClientId("542678605378-hlspiumlr34nq04cmjtkft17i6k3hvr0.apps.googleusercontent.com")
.setClientSecret("{client_secretid}")
);
// Build flow and trigger user authorization request.
GoogleAuthorizationCodeFlow flow =
new GoogleAuthorizationCodeFlow.Builder(
AndroidHttp.newCompatibleTransport(), JacksonFactory.getDefaultInstance(), googleSecrets, Arrays.asList(SCOPES))
.setAccessType("offline")
.build();
Credential credential1 = new AuthorizationCodeInstalledApp(
flow, new LocalServerReceiver()).authorize("user");
Log.i("AA","credential1--"+credential1);
new MakeRequestTask(credential).execute();
Подробнее здесь: https://stackoverflow.com/questions/492 ... wt-desktop
Мобильная версия