anod / AppWatcher

App Watcher for Android helps you to follow updates of applications in Play Store that are not installed currently on your device.
https://play.google.com/store/apps/details?id=com.anod.appwatcher
Other
74 stars 8 forks source link

Gradle Sync Issue #100

Open richforest0506 opened 1 year ago

richforest0506 commented 1 year ago

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 commented 1 year ago

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

richforest0506 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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