android / input-samples

Multiple samples showing the best practices in input on Android.
Apache License 2.0
288 stars 265 forks source link

AutofillFramework sample needs update to support Flamingo and later studio versions #55

Open nishanthkumarg opened 1 year ago

nishanthkumarg commented 1 year ago
Steps

1) Open AutoFillFramework sample 2) Click on link upgrade gradle wrapper to 7.2 and re-import project

Actual

1) When re-import happens project suck at re-download dependencies error page and clicking on it will not change anything. 2) Close and re-opening project will also not work

Unable to find method ''org.gradle.api.file.DirectoryProperty org.gradle.api.file.ProjectLayout.directoryProperty(org.gradle.api.provider.Provider)''
'org.gradle.api.file.DirectoryProperty org.gradle.api.file.ProjectLayout.directoryProperty(org.gradle.api.provider.Provider)'

Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.

Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
Workaround

1) Open Application build.gradle and update the AGP to classpath 'com.android.tools.build:gradle:8.0.0-rc01' and gradle wrapper properties distribution url to distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip 2) Add the mavenCentral() repo in the Application build.gradle 3) Add package namespace in the build.gradle for Application and afservice 4) Gradle Sync > Sync will be successful and able to deploy