Skip to content

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api' #311

Closed

Description

@mnlbox

Hi @crazycodeboy I see this warning in new app:

> Configure project :react-native-splash-screen 
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (26.0.3) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.4.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '26.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

I think it's related to gradle version and we need some update to fix this.

Activity

  1. Shhzdmrz commented on Oct 9, 2018

    @Shhzdmrz
    Contributor

    +1

  2. hasanraz commented on Oct 21, 2018

    @hasanraz

    How to Avoid this issue

  3. rajnishcoder commented on Oct 22, 2018

    @rajnishcoder

    any update ?

  4. ozalexo commented on Oct 26, 2018

    @ozalexo
  5. amnan181 commented on Jan 2, 2019

    @amnan181

    hi i can remove this error....
    Sorry for poor english...!
    change all bundle.gradle files
    goto your project and then node_modules then goto where module you installed ex**.react-native-splash-screen**.Find and open build.gradle ----->> buildToolsVersion : "27.0.3"
    and next find dependencies change where write compile and then change compile to "implementation".
    if you are face any problem then you paste your comment.

  6. CONSJOBS commented on Jan 22, 2019

    @CONSJOBS

    There is no compile, all are implementation, what is this error?

  7. AftabUfaq commented on Jan 16, 2020

    @AftabUfaq

    i have warning in the react-native-fetch-blob library ......
    Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html WARNING: Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html WARNING: The specified Android SDK Build Tools version (26.0.3) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.4. Android SDK Build Tools 27.0.3 will be used. To suppress this warning, remove "buildToolsVersion '26.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

  8. Parthshiroya06 commented on Oct 21, 2021

    @Parthshiroya06

    project :react-native-toast
    WARNING:: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
    It will be removed in version 7.0 of the Android Gradle plugin.
    For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.
    WARNING:: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (30.0.2) for Android Gradle Plugin 4.2.2.
    Android SDK Build Tools 30.0.2 will be used.
    To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
    WARNING:: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (30.0.2) for Android Gradle Plugin 4.2.2.
    Android SDK Build Tools 30.0.2 will be used.
    To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
    File C:\Users\Parth Shiroya.android\repositories.cfg could not be loaded.
    Checking the license for package Android SDK Platform 23 in C:\Users\ParthShiroya\Android\Sdk\licenses
    License for package Android SDK Platform 23 accepted.
    Preparing "Install Android SDK Platform 23 (revision: 3)".
    Warning: Failed to read or create install properties file.

  9. 1-pro commented on Jan 2, 2022

    @1-pro

    I have been battling with same error

    yarn run:android
    yarn run v1.22.17
    warning ../../package.json: No license field
    $ react-native run-android
    info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
    Jetifier found 1673 file(s) to forward-jetify. Using 4 workers...
    info Starting JS server...

    • daemon not running; starting now at tcp:5037
    • daemon started successfully
      info Launching emulator...
      info Successfully launched emulator.
      info Installing the app...
      Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details

    Configure project :app
    WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
    It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01

    FAILURE: Build failed with an exception.

    • What went wrong:
      Could not determine the dependencies of task ':app:preDebugBuild'.

    Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
    Could not resolve androidx.multidex:multidex:2.0.0.
    Required by:
    project :app
    > Could not resolve androidx.multidex:multidex:2.0.0.
    > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/multidex/multidex/2.0.0/multidex-2.0.0.pom'.
    > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/multidex/multidex/2.0.0/multidex-2.0.0.pom'.
    > Remote host terminated the handshake
    > Skipped due to earlier error
    Could not resolve androidx.multidex:multidex:2.0.0.
    Required by:
    project :app
    > Could not resolve androidx.multidex:multidex:2.0.0.
    > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/multidex/multidex/2.0.0/multidex-2.0.0.pom'.
    > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/multidex/multidex/2.0.0/multidex-2.0.0.pom'.
    > Remote host terminated the handshake
    > Skipped due to earlier error
    Could not resolve com.facebook.react:react-native:+.
    Required by:
    project :app
    project :app > project :react-native-community_masked-view
    project :app > project :react-native-community_toolbar-android
    project :app > project :react-native-gesture-handler
    project :app > project :react-native-localize
    project :app > project :react-native-reanimated
    project :app > project :react-native-safe-area-context
    project :app > project :react-native-screens
    project :app > project :react-native-vector-icons
    > Failed to list versions for com.facebook.react:react-native.
    > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/com/facebook/react/react-native/maven-metadata.xml.
    > Could not get resource 'https://dl.google.com/dl/android/maven2/com/facebook/react/react-native/maven-metadata.xml'.
    > Could not GET 'https://dl.google.com/dl/android/maven2/com/facebook/react/react-native/maven-metadata.xml'.
    > dl.google.com: Temporary failure in name resolution
    > Failed to list versions for com.facebook.react:react-native.
    > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
    > Could not get resource 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
    > Could not GET 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
    > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/34.95.74.180] failed: connect timed out
    Could not resolve androidx.swiperefreshlayout:swiperefreshlayout:1.0.0.
    Required by:
    project :app > project :react-native-screens
    > Could not resolve androidx.swiperefreshlayout:swiperefreshlayout:1.0.0.
    > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.pom'.
    > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.pom'.
    > dl.google.com: Temporary failure in name resolution
    > Skipped due to earlier error

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    • Get more help at https://help.gradle.org

    BUILD FAILED in 9m 24s

    error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
    Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

    Please whats the solution?

  10. aaryavrate commented on Mar 1, 2022

    @aaryavrate

    Why some "Genius" does this type of name change? sucks :(

  11. sharjeel125 commented on May 15, 2022

    @sharjeel125

    Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
    It will be removed soon. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
    Affected Modules: PDFView, app, react-native-pdf-view

  12. sharjeel125 commented on May 15, 2022

    @sharjeel125

    Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
    It will be removed soon. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
    Affected Modules: PDFView, app, react-native-pdf-view
    please help how to get rid of this ..... this throw error pdf view is affected and throws error not able to build how to fix this

    Could not determine the dependencies of task ':PDFView:compileDebugRenderscript'.

    Could not resolve all task dependencies for configuration ':PDFView:debugCompileClasspath'.
    Could not resolve com.facebook.react:react-native:0.20.+.
    Required by:
    project :PDFView
    > Failed to list versions for com.facebook.react:react-native.
    > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
    > Could not HEAD 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
    > org.apache.http.client.ClientProtocolException (no error message)
    > Failed to list versions for com.facebook.react:react-native.
    > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
    > Could not HEAD 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
    > org.apache.http.client.ClientProtocolException (no error message)

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions