質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Kotlin

Kotlinは、ジェットブレインズ社のアンドリー・ブレスラフ、ドミトリー・ジェメロフが開発した、 静的型付けのオブジェクト指向プログラミング言語です。

Q&A

解決済

1回答

2816閲覧

realmの導入をしようとするとエラーを吐く

DaichiNakajima

総合スコア62

Kotlin

Kotlinは、ジェットブレインズ社のアンドリー・ブレスラフ、ドミトリー・ジェメロフが開発した、 静的型付けのオブジェクト指向プログラミング言語です。

0グッド

0クリップ

投稿2020/10/29 01:36

編集2020/10/29 01:49

realmの導入をしようとすると以下のようなエラーが出てしまいます。

///build.grandle(project) buildscript { ext.kotlin_version = "1.4.10" repositories { google() jcenter() } dependencies { classpath "com.android.tools.build:gradle:4.1.0" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "io.realm:realm-grandle-plugin:10.0.0"//ここを打ち込みました // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }
///build.grandle(app) plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-kapt' id 'realm-android' } android { compileSdkVersion 29 compileOptions{ sourceCompatibility JavaVersion.VERSION_15//17まであった targetCompatibility JavaVersion.VERSION_15//17まであった } buildToolsVersion "29.0.3" defaultConfig { vectorDrawables.useSupportLibrary = true//ペグタ形式 applicationId "com.example.myscheduler2" minSdkVersion 19 targetSdkVersion 29 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } dependencies { implementation "io.realm:android-adapters:2.1.1"//このヴァーションもあれなのか?古いのか? implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation 'androidx.core:core-ktx:1.3.2' implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.android.material:material:1.2.1' implementation 'androidx.constraintlayout:constraintlayout:2.0.2' implementation 'androidx.navigation:navigation-fragment-ktx:2.3.1' implementation 'androidx.navigation:navigation-ui-ktx:2.3.1' testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' }

エラーは以下のようになりました。realmのページを参照して導入したので、手順は間違っていないと思うのですが、、、

A problem occurred configuring root project 'MyScheduler2'. > Could not resolve all artifacts for configuration ':classpath'. > Could not find io.realm:realm-grandle-plugin:10.0.0. Searched in the following locations: - https://dl.google.com/dl/android/maven2/io/realm/realm-grandle-plugin/10.0.0/realm-grandle-plugin-10.0.0.pom - https://jcenter.bintray.com/io/realm/realm-grandle-plugin/10.0.0/realm-grandle-plugin-10.0.0.pom Required by: project : Possible solution: - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

よろしくお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

スペルミスありますね。grandleではなくてgradle。
■正
classpath "io.realm:realm-gradle-plugin:10.0.0"
■誤
classpath "io.realm:realm-grandle-plugin:10.0.0"

投稿2020/10/29 02:10

Sagamaru

総合スコア70

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

DaichiNakajima

2020/10/29 02:17

簡単なミスでした、、、以後気をつけます!解決しました、ありがとうごまいました!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問