yashovardhan99 / HealersDiary

Healers Diary - an android app for healers to keep track of their patients and help in instant billing. The app is currently in development.
https://play.google.com/store/apps/details?id=com.yashovardhan99.healersdiary&utm_source=github&utm_campaign=github&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1
Apache License 2.0
8 stars 0 forks source link

error: cannot access Request - bad class file #49

Closed donenoyes closed 3 years ago

donenoyes commented 3 years ago

Describe the bug On trying to compile the app, got this error.

D:\yashovardhan99\HealersDiary\app\build\tmp\kapt3\stubs\debug\com\yashovardhan99\healersdiary\dashboard\DashboardViewModel.java:31: error: cannot access Request
    private final kotlinx.coroutines.flow.MutableStateFlow<com.yashovardhan99.core.utils.Request> _requests = null;
                                                                                        ^
  bad class file: D:\yashovardhan99\HealersDiary\core\build\intermediates\compile_library_classes_jar\debug\classes.jar(/com/yashovardhan99/core/utils/Request.class)
    class file contains malformed variable arity method: Request(String[],DefaultConstructorMarker)
    Please remove or make sure it appears in the correct subdirectory of the classpath.

To Reproduce Steps to reproduce the behavior:

  1. Add google services json and do rebuild or run the app.

Expected behavior To successfully compile the app.

Please suggest a fix to this issue.

yashovardhan99 commented 3 years ago

Hi :wave: , thanks for letting me know! Can you try running a gradle clean and then try building again. Run ./gradlew clean and then ./gradlew build.

If that doesn't work, please share exactly where you are adding your google-services.json file. Make sure it is added in both the app and online module.

Also make sure you are working on a fresh pull from master and are using java 8.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.