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

Issue Building for Android #2889

Open
ColtraneNadler opened this issue Dec 1, 2024 · 1 comment
Open

Issue Building for Android #2889

ColtraneNadler opened this issue Dec 1, 2024 · 1 comment

Comments

@ColtraneNadler
Copy link

Description

Error when attempting to build for android.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':app:debugCompileClasspath'.
   > Could not resolve project :react-native-iap.
     Required by:
         project :app
      > No matching variant of project :react-native-iap was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.6.0', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
          - No variants exist.
   > Could not resolve project :react-native-iap.
     Required by:
         project :app
      > No matching variant of project :react-native-iap was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.6.0', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
          - No variants exist.

There also no listed outgoing variants
when using ./gradlew :react-native-iap:outgoingVariants --info


> Task :react-native-iap:outgoingVariants
Caching disabled for task ':react-native-iap:outgoingVariants' because:
  Build cache is disabled
Task ':react-native-iap:outgoingVariants' is not up-to-date because:
  Task has not declared any outputs despite executing actions.

Environment:

  • react-native-iap: 12.15.7
  • react-native: 0.73.6

My existing build.gradle file has the following defaultConfig

android {
...
  defaultConfig {
        ...
        missingDimensionStrategy 'store', 'play' // or amazon
        multiDexEnabled true
        ...
    }
  
}

To Reproduce
Steps to reproduce the behavior:

./gradlew build

@arechsteiner
Copy link

For me, the plugin entry was missing in the config:

https://react-native-iap.hyo.dev/docs/get-started/#expo

After adding that, and running yarn expo prebuild again, the problem disappeared.

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