

以下に示したコードで同期をとると、イベントログに下記Errorが出力されます。

何か設定が足らないのでしょうか？

**エラーメッセージ**

[code]

    Gradle sync failed: Could not find method compile() for arguments [com.fasterxml.jackson.core:jackson-databind:2.9.8] on root project 'LoginActivity' of type org.gradle.api.Project.
                Consult IDE log for more details (Help | Show Log)
    
[/code]

### ソースコード

**LoginActivity.java**

[code]

    package com.example.loginactivity.ui.login;
    
    import android.app.Activity;
    import android.app.AlertDialog;
    import android.content.DialogInterface;
    import android.content.Intent;
    import android.os.Bundle;
    import android.text.Editable;
    import android.text.TextWatcher;
    import android.view.KeyEvent;
    import android.view.View;
    import android.view.inputmethod.EditorInfo;
    import android.widget.Button;
    import android.widget.EditText;
    import android.widget.ProgressBar;
    import android.widget.TextView;
    import android.widget.Toast;
    
    import androidx.annotation.Nullable;
    import androidx.annotation.StringRes;
    import androidx.appcompat.app.AppCompatActivity;
    import androidx.lifecycle.Observer;
    import androidx.lifecycle.ViewModelProviders;
    
    import com.example.loginactivity.R;
    import org.json.JSONObject;
    
    import java.io.BufferedReader;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.net.HttpURLConnection;
    import java.net.URL;
    
[/code]

**build gradle(:app)**

[code]

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
    
        implementation 'androidx.appcompat:appcompat:1.1.0'
        implementation 'com.google.android.material:material:1.1.0'
        implementation 'androidx.annotation:annotation:1.1.0'
        implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
        implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
        implementation 'com.squareup.okhttp3:okhttp:4.0.0-alpha02'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'androidx.test.ext:junit:1.1.1'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
        implementation  'com.journeyapps:zxing-android-embedded:3.6.0'
        implementation  'com.google.zxing:core:3.3.0'
        implementation 'com.fasterxml.jackson.core:jackson-databind:2.10.0'
        implementation 'com.fasterxml.jackson.core:jackson-annotations:2.10.0'
    }
    
[/code]


CC BY-SA 4.0
2020-10-14T11:29:44.083
71192
2020-10-15T00:46:59.893
2020-10-14T11:59:47.173
3060
42215
question
java android android-studio
Canonot resolve symbol fasterxml


Build Gradle (LoginAcitivity) に以下の記述をしていたのが原因だったようです。  
コメントアウトしたら ReBuild できました。

[code]

    implement  'com.fasterxml.jackson.core:jackson-databind:2.9.8'
    
[/code]


CC BY-SA 4.0
2020-10-15T00:31:19.173
71200
2020-10-15T00:46:59.893
2020-10-15T00:46:59.893
3060
42215
71192
answer