0
Xamarin.Auth 패키지를 사용하여 사용자가 Google 로그인 페이지를 통해 인증 할 수 있도록하려는 Xamarin.Android 프로젝트가 있습니다. 여기 Java.Lang.ClassNotFoundException WebAuthenticatorActivity
는 MainActivity.csOAuth2Authenticator auth = new OAuth2Authenticator
(
clientId: "client-id.apps.googleusercontent.com",
scope: "",
authorizeUrl: new Uri("https://accounts.google.com/o/oauth2/v2/auth"),
redirectUrl: new Uri("http://www.facebook.com/connect/login_success.html"),
// switch for new Native UI API
// true = Android Custom Tabs and/or iOS Safari View Controller
// false = Embedded Browsers used (Android WebView, iOS UIWebView)
// default = false (not using NEW native UI)
isUsingNativeUI: false
);
auth.Completed += (sender, eventArgs) =>
{
// UI presented, so it's up to us to dimiss it on Android
// dismiss Activity with WebView or CustomTabs
this.Finish();
if (eventArgs.IsAuthenticated)
{
// Use eventArgs.Account to do wonderful things
}
else
{
// The user cancelled
}
};
var ui_object = auth.GetUI(this);
StartActivity(ui_object);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
나는에 allways auth.GetUI를 호출 (이) 메소드 예외를 folowing에 끝에서 내 코드입니다 :
JNIEnv.FindClass(Type) caught unexpected exception: Java.Lang.ClassNotFoundException: md53c585be971e02235139fd1aef11fc0c1.WebAuthenticatorActivity ---> Java.Lang.ClassNotFoundException: Didn't find class "md53c585be971e02235139fd1aef11fc0c1.WebAuthenticatorActivity"
가 할 왜 사람이 볼 수 이? 나는 그것을 시험해 보았지만 나는 이런 종류의 오류를 얻는 사람 일뿐입니다.
나는 VS 2017 15.5.2 및 26
'classes.dex'가 (가) 편리합니까? 'obj/{configuration}/android/bin'에 위치해야합니다. –
'bin/obj' 폴더를 비우고 다시 빌드하십시오. –