input-samples icon indicating copy to clipboard operation
input-samples copied to clipboard

Unable to compile afservice

Open fadookie opened this issue 5 months ago • 0 comments

These sample projects are using an ancient version of Gradle and AGP. To get them to build locally using my Oracle jdk-17.0.5 I had to upgrade Gradle to 7.3.3 and AGP to com.android.tools.build:gradle:7.2.0. I am then able to build Application target from Android studio, but when I try to build afservice I get the following errors which all say Not sure how to convert a Cursor to this method's return type (absolute paths have been redacted):

<REDACTED>/input-samples/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/source/local/dao/AutofillDao.java:46: error: Not sure how to convert a Cursor to this method's return type
    List<DatasetWithFilledAutofillFields> getDatasets(List<String> allAutofillHints);
                                          ^
<REDACTED>/input-samples/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/source/local/dao/AutofillDao.java:50: error: Not sure how to convert a Cursor to this method's return type
    List<DatasetWithFilledAutofillFields> getAllDatasets();
                                          ^
<REDACTED>/input-samples/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/source/local/dao/AutofillDao.java:65: error: Not sure how to convert a Cursor to this method's return type
    List<DatasetWithFilledAutofillFields> getDatasetsWithName(
                                          ^
<REDACTED>/input-samples/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/source/local/dao/AutofillDao.java:77: error: Not sure how to convert a Cursor to this method's return type
    List<FieldTypeWithHeuristics> getFieldTypesWithHints();
                                  ^
<REDACTED>/input-samples/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/source/local/dao/AutofillDao.java:89: error: Not sure how to convert a Cursor to this method's return type
    List<FieldTypeWithHeuristics> getFieldTypesForAutofillHints(List<String> autofillHints);
                                  ^
<REDACTED>/input-samples/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/source/local/dao/AutofillDao.java:94: error: Not sure how to convert a Cursor to this method's return type
    DatasetWithFilledAutofillFields getAutofillDatasetWithId(String datasetId);
                                    ^

fadookie avatar Aug 29 '24 01:08 fadookie