Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle Sync Issue #100

Open
richforest0506 opened this issue May 9, 2023 · 5 comments
Open

Gradle Sync Issue #100

richforest0506 opened this issue May 9, 2023 · 5 comments

Comments

@richforest0506
Copy link

I have interested with this project.
So I have tried to compile this project in Android Studio Flamingo | 2022.2.1 Patch 1. It was built on April 20, 2023.
But when sync project with gradle files, following error occurred.

The project is using an incompatible version (AGP 8.1.0-alpha11) of the Android Gradle plugin. Latest supported version is AGP 8.0.1
See Android Studio & AGP compatibility options.

So I changed version "8.1.0-alpha11" to version "8.0.1" in the Gradle file.
Then another error is displayed.

How can I compile?
Should I use other version?

@anod
Copy link
Owner

anod commented May 9, 2023

AGP 8.1 is Giraffe , but you should be able build by downgrading to 8.0.1 Which errors do you get?

@richforest0506
Copy link
Author

richforest0506 commented May 9, 2023

Thanks for your response.
I have downgraded to 8.0.1 as following.

plugins {
    id("com.android.application") version "8.0.1" apply false
    id("com.android.library") version "8.0.1" apply false
    id("com.android.test") version "8.0.1" apply false
    alias(libs.plugins.kotlin.plugin) apply false
}

But when make project, I get the following error.

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not resolve project :lib:applog.
     Required by:
         project :app
      > No matching configuration of project :lib:applog was found. The consumer was configured to find a component for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.0.1', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
          - None of the consumable configurations have attributes.
   > Could not resolve project :lib:compose.
     Required by:
         project :app
      > No matching configuration of project :lib:compose was found. The consumer was configured to find a component for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.0.1', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
          - None of the consumable configurations have attributes.
   > Could not resolve project :lib:graphics.
     Required by:
         project :app
      > No matching configuration of project :lib:graphics was found. The consumer was configured to find a component for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.0.1', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
          - None of the consumable configurations have attributes.
   > Could not resolve project :lib:framework.
     Required by:
         project :app
      > No matching configuration of project :lib:framework was found. The consumer was configured to find a component for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.0.1', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
          - None of the consumable configurations have attributes.
   > Could not resolve project :lib:ktx.
     Required by:
         project :app
      > No matching configuration of project :lib:ktx was found. The consumer was configured to find a component for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.0.1', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
          - None of the consumable configurations have attributes.
   > Could not resolve project :lib:permissions.
     Required by:
         project :app
      > No matching configuration of project :lib:permissions was found. The consumer was configured to find a component for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.0.1', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
          - None of the consumable configurations have attributes.

* 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.

@anod
Copy link
Owner

anod commented May 9, 2023

Looks like you didn't checkout git submodule. The lib folder content is missing, it contains code shared between multiple projects

Depends on which git client you use, you need to perform checkout of submoduke

@richforest0506
Copy link
Author

richforest0506 commented May 9, 2023

The errors mentioned before was fixed. Thanks for your help.
But another error was occurred.

Generated google-services.json with package name com.anod.appwatcher.

How can I fix it?

Execution failed for task ':app:processDebugGoogleServices'.
> No matching client found for package name 'com.anod.appwatcher.debug'

* 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.

@anod
Copy link
Owner

anod commented May 10, 2023

I have updated readme with build instructions, see step 2
https://github.com/anod/AppWatcher/blob/master/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants