Error: Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.60-eap-25 in Ionic 3

前端 未结 9 1680
我寻月下人不归
我寻月下人不归 2021-01-30 19:39

I am getting the following error suddenly while building Ionic 3 app for Android.

Could not find org.jetbrains.kotlin:ko         


        
相关标签:
9条回答
  • 2021-01-30 20:14

    Here is the solution.

    The problem was exactly the maven repository (here), but the issue was with the build.gradle from the cordova-support-google-services plugin, so I added the required line and everything is ok now, I've already created a pull request to the original repo (here). But in the meantime you can do what I did, just replace in the package.json the current versión with my repo:

    Before:

    ...
    "cordova-support-google-services": "^1.3.1",
    ...
    

    After:

    ...
    "cordova-support-google-services": "https://github.com/LuisEGR/cordova-support-google-services.git",
    ...
    

    after that you will have to:

    • Remove folders platforms and plugins
    • run npm install

    This is a temporal solution while the pull request to the main repo gets accepted and the npm package updated

    and that's it, now you can build your project again.


    I'm using Ionic 4, and some plugins require cordova-support-google-services, in case you don't have it in your package.json the error could be with another plugin, if so please add the package.json so we can find out which one is the problem.


    UPDATE 24/OCT:

    I've changed the solution in my repo as many of you suggested, now the solution consinst just in fixing the dependency: from: com.android.tools.build:gradle:+ to classpath com.android.tools.build:gradle:3.+, this is already in my repo if you want to see what's changed

    0 讨论(0)
  • 2021-01-30 20:15

    Solution for ionic v3 and cordova

    @Mister Smith solution solved my problem

    you have to go to the file

    platforms/android/cordova-support-google-services
    

    then

    Replace

    classpath 'com.android.tools.build:gradle:+'

    by

    classpath 'com.android.tools.build:gradle:3.5.1'
    

    @Alternative solution I have found is to

    setup kotlin in your system :)
    
    0 讨论(0)
  • 2021-01-30 20:17

    I had to add maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' } both into the top-level build.gradle and into the app module build.gradle. In both cases both into the buildscripts.repositories and in allprojects.repositories

    0 讨论(0)
提交回复
热议问题