version5.0.1 java.lang.NoClassDefFoundError: com.linecorp.linesdk.internal.nwclient.OpenIdSigningKeyResolver
See original GitHub issueSuch an error occurs. What are the possible causes?
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.nrikiji.linetest314, PID: 2431
java.lang.NoClassDefFoundError: com.linecorp.linesdk.internal.nwclient.OpenIdSigningKeyResolver
at com.linecorp.linesdk.internal.nwclient.LineAuthenticationApiClient.<init>(LineAuthenticationApiClient.java:59)
at com.linecorp.linesdk.internal.nwclient.LineAuthenticationApiClient.<init>(LineAuthenticationApiClient.java:71)
at com.linecorp.linesdk.auth.internal.LineAuthenticationController.<init>(LineAuthenticationController.java:75)
at com.linecorp.linesdk.auth.internal.LineAuthenticationActivity.onCreate(LineAuthenticationActivity.java:90)
at android.app.Activity.performCreate(Activity.java:6285)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2417)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2524)
at android.app.ActivityThread.access$900(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1391)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:234)
at android.app.ActivityThread.main(ActivityThread.java:5526)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
https://developers.line.biz/ja/docs/android-sdk/integrate-line-login/ When installing the SDK and executing the following code by this procedure it will crash…
package com.example.nrikiji.linetest314;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import com.linecorp.linesdk.Scope;
import com.linecorp.linesdk.auth.LineAuthenticationParams;
import com.linecorp.linesdk.auth.LineLoginApi;
import com.linecorp.linesdk.auth.LineLoginResult;
import java.util.Arrays;
public class MainActivity extends AppCompatActivity {
private static final int REQUEST_CODE = 1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
try{
// App-to-app login
Intent loginIntent = LineLoginApi.getLoginIntent(
getApplicationContext(),
"1565553788",
new LineAuthenticationParams.Builder()
.scopes(Arrays.asList(Scope.PROFILE))
.build());
startActivityForResult(loginIntent, REQUEST_CODE); // ★ Crash!!
}
catch(Exception e) {
Log.e("ERROR", e.toString());
}
}
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode != REQUEST_CODE) {
Log.e("ERROR", "Unsupported Request");
return;
}
LineLoginResult result = LineLoginApi.getLoginResultFromIntent(data);
switch (result.getResponseCode()) {
case SUCCESS:
// Login successful
String accessToken = result.getLineCredential().getAccessToken().getTokenString();
break;
case CANCEL:
// Login canceled by user
Log.e("ERROR", "LINE Login Canceled by user.");
break;
default:
// Login canceled due to other error
Log.e("ERROR", "Login FAILED!");
Log.e("ERROR", result.getErrorData().toString());
}
}}
The version of android studio
is 3.1.4 and the development environment can not be upgraded above this due to circumstances of …
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Failed to install android-sdk: "java.lang.NoClassDefFoundError
Just had this error, solved by downloading the Android SDK Command-line Tools (latest) on Android Studio, under Preferences > Appearance & Behavior >...
Read more >line-sdk-android - bytemeta
Failed Build Android (React Native) on LINE SDK 5.0.1, java.lang.NoClassDefFoundError: com.linecorp.linesdk.internal.nwclient.OpenIdSigningKeyResolver.
Read more >line-sdk-android from line - GithubHelp
version5.0.1 java.lang.NoClassDefFoundError: com.linecorp.linesdk.internal.nwclient.OpenIdSigningKeyResolver. Such an error occurs. What are the possible causes ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry. I tried it again and it went well. The setting of gradle may have been wrong
build.gradle
congratulations~~~