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

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

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

RealmとはSQLiteやCore Dataに代わるモバイルデータベースです。iOSとAndroidの両方でサポートされています。

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

Kotlin

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

Q&A

解決済

1回答

2935閲覧

Android StudioでRealmを導入したい

bibi10026349

総合スコア0

Realm

RealmとはSQLiteやCore Dataに代わるモバイルデータベースです。iOSとAndroidの両方でサポートされています。

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

Kotlin

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

0グッド

0クリップ

投稿2021/05/09 05:34

前提・実現したいこと

Realmの導入したいのですがこのようなエラーが発生しました。

発生している問題・エラーメッセージ

html

1A problem occurred configuring root project 'MyScheduler'. 2> Could not resolve all artifacts for configuration ':classpath'. 3 > Could not find io.realm:realm-gradle-plugin:10.0.1. 4 Searched in the following locations: 5 - https://dl.google.com/dl/android/maven2/io/realm/realm-gradle-plugin/10.0.1/realm-gradle-plugin-10.0.1.pom 6 - https://repo.maven.apache.org/maven2/io/realm/realm-gradle-plugin/10.0.1/realm-gradle-plugin-10.0.1.pom 7 Required by: 8 project : 9 10Possible solution: 11 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

該当のソースコード

build.gradle

html

1// Top-level build file where you can add configuration options common to all sub-projects/modules. 2buildscript { 3 ext.kotlin_version = "1.4.31" 4 repositories { 5 google() 6 mavenCentral() 7 } 8 dependencies { 9 classpath "com.android.tools.build:gradle:4.2.0" 10 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 classpath "io.realm:realm-gradle-plugin:10.0.1" 12 // NOTE: Do not place your application dependencies here; they belong 13 // in the individual module build.gradle files 14 } 15}

build.gradle(:app)

html

1plugins { 2 id 'com.android.application' 3 id 'kotlin-android' 4 id 'kotlin-kapt' 5 id 'realm-android' 6} 7 8android { 9 compileSdkVersion 30 10 buildToolsVersion "30.0.3" 11 12 defaultConfig { 13 applicationId "com.example.myscheduler" 14 minSdkVersion 16 15 targetSdkVersion 30 16 versionCode 1 17 versionName "1.0" 18 19 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 20 } 21 22 buildTypes { 23 release { 24 minifyEnabled false 25 proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 26 } 27 } 28 compileOptions { 29 sourceCompatibility JavaVersion.VERSION_1_8 30 targetCompatibility JavaVersion.VERSION_1_8 31 } 32 kotlinOptions { 33 jvmTarget = '1.8' 34 } 35 buildFeatures { 36 viewBinding true 37 } 38} 39 40dependencies { 41 42 implementation 'io.realm:android-adapters:2.1.1' 43 implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" 44 implementation 'androidx.core:core-ktx:1.3.2' 45 implementation 'androidx.appcompat:appcompat:1.2.0' 46 implementation 'com.google.android.material:material:1.3.0' 47 implementation 'androidx.constraintlayout:constraintlayout:2.0.4' 48 implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5' 49 implementation 'androidx.navigation:navigation-ui-ktx:2.3.5' 50 testImplementation 'junit:junit:4.13.2' 51 androidTestImplementation 'androidx.test.ext:junit:1.1.2' 52 androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' 53}

試したこと

ここに問題に対して試したことを記載してください。

補足情報(FW/ツールのバージョンなど)

android studio 4.2
kotlin 1.4.31

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

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

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

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

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

guest

回答1

0

自己解決

android studio をアンインストールしてバージョン4.1.3をインストールしアップデート前に戻すことで不具合なく使えるようになりました。

投稿2021/05/12 02:16

bibi10026349

総合スコア0

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.50%

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

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

質問する

関連した質問