Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot start android on intellij [duplicate]

I am new to android development. I am trying to start a "hello world" project for an android app following the google android fundamentals course.

I believe i have the android plugin correctly installed. I keep getting the

error: Failed to resolve: org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.21

The code in my hello world app is:

buildscript {
ext.kotlin_version = '1.3.21'
repositories {
    google()
    jcenter()
    }
    dependencies {
    classpath 'com.android.tools.build:gradle:3.1.0'
    //classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21"
    classpath "org.jetbrains.kotlin:kotlin-stdlib:1.3.21"
    //classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
    google()
    jcenter()
    }
}

task clean(type: Delete) {
delete rootProject.buildDir
like image 771
Abdallah Ibrahim Avatar asked Feb 13 '19 21:02

Abdallah Ibrahim


People also ask

Do I need Android Studio if I have IntelliJ IDEA?

If I'm already a user of IntelliJ IDEA, do I need to switch to Android Studio for Android development? No. Android Studio is focused specifically on Android development and provides streamlined environment and project setup, but otherwise all of its features are available in IntelliJ IDEA.

Can IntelliJ run Android?

IntelliJ IDEA is one of the popular IDE that is used for developing android applications.

Is Android Studio better than IntelliJ?

Android Studio is actually based on IntelliJ IDEA, but specializes in developing for the Android platform. In contrast, IntelliJ IDEA is a more generalist IDE that helps developers create code for any platform. Both are popular with businesses of all sizes, depending on the use case of the organization.

Does IntelliJ have Android Studio?

Android Studio Plugin Development Android Studio plugins extend or add functionality to the Android Studio IDE. Plugins can be written in Kotlin or Java, or a mix of both, and are created using IntelliJ IDEA and the IntelliJ Platform.


1 Answers

You need to replace jre by jdk as suggested by EpicPandaForce:

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
like image 58
creativecreatorormaybenot Avatar answered Sep 19 '22 22:09

creativecreatorormaybenot