jeziellago / compose-markdown

Markdown Text for Android Jetpack Compose 📋.
MIT License
508 stars 42 forks source link

Having troubles using the dependecy #12

Closed nurlan-aliyev closed 2 years ago

nurlan-aliyev commented 2 years ago

I get this error (maybe the "TAG" version is not on point?): Failed to resolve: com.github.jeziellago:compose-markdown:TAG

Nehoko commented 2 years ago

same problem.

  1. cloned fresh kotlin desktop-compose repository
  2. added maven repository:
    repositories {
    mavenCentral()
    maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
    google()
    maven ("https://jitpack.io")
    }
  3. added dependency
    dependencies {
    // Note, if you develop a library, you should use compose.desktop.common.
    // compose.desktop.currentOs should be used in launcher-sourceSet
    // (in a separate module for demo project and in testMain).
    // With compose.desktop.common you will also lose @Preview functionality
    implementation(compose.desktop.currentOs)
    implementation("com.github.jeziellago", "compose-markdown", "0.2.6")
    }
  4. got the error:
    
    Could not resolve com.github.jeziellago:compose-markdown:0.2.6.
    Required by:
    project :

Possible solution:

jeziellago commented 2 years ago

I get this error (maybe the "TAG" version is not on point?): Failed to resolve: com.github.jeziellago:compose-markdown:TAG

Hello @nurlan-aliyev, You need replace TAG to the tag version number, like 0.2.6:

com.github.jeziellago:compose-markdown:0.2.6

For any other problems with dependency resolution, check this comment: https://github.com/jeziellago/compose-markdown/issues/11#issuecomment-915175441

jeziellago commented 2 years ago

same problem.

  1. cloned fresh kotlin desktop-compose repository
  2. added maven repository:
repositories {
    mavenCentral()
    maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
    google()
    maven ("https://jitpack.io")
}
  1. added dependency
dependencies {
    // Note, if you develop a library, you should use compose.desktop.common.
    // compose.desktop.currentOs should be used in launcher-sourceSet
    // (in a separate module for demo project and in testMain).
    // With compose.desktop.common you will also lose @Preview functionality
    implementation(compose.desktop.currentOs)
    implementation("com.github.jeziellago", "compose-markdown", "0.2.6")
}
  1. got the error:
Could not resolve com.github.jeziellago:compose-markdown:0.2.6.
Required by:
    project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Hi @Nehoko, At the moment, compose-markdown works only with android Jetpack Compose.

nurlan-aliyev commented 2 years ago

Getting the same type of error, says cannot resolve "project-link:0.2.6"

Maybe I'm not doing it correctly?

jeziellago commented 2 years ago

Getting the same type of error, says cannot resolve "project-link:0.2.6"

Maybe I'm not doing it correctly?

If you're trying it on kotlin desktop-compose, it'll doesn't work. Only works in android projects.

nurlan-aliyev commented 2 years ago

I want to develop an Android app, not a desktop one

jeziellago commented 2 years ago

I want to develop an Android app, not a desktop one @nurlan-aliyev, try to follow these steps:

  1. Open the file settings.gradle (it looks like that)
    dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
    google()
    mavenCentral()
    // add jitpack here 👇🏽
    maven { url 'https://jitpack.io' }
    ...
    }
    } 
    ...
  2. Sync the project
  3. Add compose-markdown dependency
    dependencies {
    implementation 'com.github.jeziellago:compose-markdown:0.2.6'
    }
nurlan-aliyev commented 2 years ago

It works now, thanks a lot, I was adding maven to project:build.gradle that was the error

Nehoko commented 2 years ago

same problem.

  1. cloned fresh kotlin desktop-compose repository
  2. added maven repository:
repositories {
    mavenCentral()
    maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
    google()
    maven ("https://jitpack.io")
}
  1. added dependency
dependencies {
    // Note, if you develop a library, you should use compose.desktop.common.
    // compose.desktop.currentOs should be used in launcher-sourceSet
    // (in a separate module for demo project and in testMain).
    // With compose.desktop.common you will also lose @Preview functionality
    implementation(compose.desktop.currentOs)
    implementation("com.github.jeziellago", "compose-markdown", "0.2.6")
}
  1. got the error:
Could not resolve com.github.jeziellago:compose-markdown:0.2.6.
Required by:
    project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Hi @Nehoko, At the moment, compose-markdown works only with android Jetpack Compose.

Is it really the case? Error message telling me that gradle cannot find package but nothing about supporting platform

jeziellago commented 2 years ago

same problem.

  1. cloned fresh kotlin desktop-compose repository
  2. added maven repository:
repositories {
    mavenCentral()
    maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
    google()
    maven ("https://jitpack.io")
}
  1. added dependency
dependencies {
    // Note, if you develop a library, you should use compose.desktop.common.
    // compose.desktop.currentOs should be used in launcher-sourceSet
    // (in a separate module for demo project and in testMain).
    // With compose.desktop.common you will also lose @Preview functionality
    implementation(compose.desktop.currentOs)
    implementation("com.github.jeziellago", "compose-markdown", "0.2.6")
}
  1. got the error:
Could not resolve com.github.jeziellago:compose-markdown:0.2.6.
Required by:
    project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Hi @Nehoko, At the moment, compose-markdown works only with android Jetpack Compose.

Is it really the case? Error message telling me that gradle cannot find package but nothing about supporting platform

Did you follow these steps https://github.com/jeziellago/compose-markdown/issues/12#issuecomment-924436370 and got the same problem?

jeziellago commented 2 years ago

Closing this issue. Let me know if you're having problems yet.