material-components-android icon indicating copy to clipboard operation
material-components-android copied to clipboard

[Component name] Project sync failed:

Open david-laurentino opened this issue 7 years ago • 3 comments

Description: Project synchronization fails with error: Cannot invoke method getCompileClasspath() on null object

Expected behavior: The project was expected to sync with no errors and could be run on device.

Source code: file: material-components-android/lib/build-gradle, line 203: tasks.each { ... it.classpath += releaseVariant.getCompileClasspath(null) it.classpath += it.project.files(releaseVariant.javaCompileProvider.get().destinationDir) it.source += releaseVariant.javaCompileProvider.get().source }

Android API version: 29

Material Library version: mdcLibraryVersion = '1.1.0-alpha10'

Device: Android Studio 3.5 Ubuntu 18.04

To help us triage faster, please check to make sure you are using the latest version of the library.

We also happily accept pull requests.

david-laurentino avatar Sep 27 '19 14:09 david-laurentino

Hi david-laurentino,

We are able to repro a similar issue if we change the gradle version in some of the properties files, but not out of the box. We are working on fixing this for newer versions of gradle, but aren't there yet.

Did you update any gradle versions in files? We're trying to make sure we have a full grasp of the issue.

ldjcmu avatar Sep 27 '19 15:09 ldjcmu

I didn't make any change in project files. This problem seemed to be related to lack of required Android SDK version. Analyzing the stacktrace messages I understood that the download should occur automatically but it failed. I installed the version 29 of SDK through SDK Manager and problem was solved.

Sorry about my english. Thank you for your attention.

david-laurentino avatar Sep 27 '19 21:09 david-laurentino

I'm glad the issue's resolved. Thanks for reaching out :)

ldjcmu avatar Oct 02 '19 16:10 ldjcmu