On the latest build of bare-workflow-expo-react-native project. I tried adding Kochova library: https://support.kochava.com/sdk-integration/reactnative-sdk-integration/
But the build is failing on android.
I get the following error:
* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not find :KochavaCore:.
Required by:
project :app > project :react-native-kochava-tracker
> Could not find :KochavaTracker:.
Required by:
project :app > project :react-native-kochava-tracker
> Could not find :KochavaTrackerEvents:.
Required by:
project :app > project :react-native-kochava-tracker
> Could not find :KochavaTrackerEngagement:.
Required by:
project :app > project :react-native-kochava-tracker
> Could not find :KochavaTrackerDatapointNetwork:.
Required by:
project :app > project :react-native-kochava-tracker
I followed the steps and added to app/build.gradle the following:
implementation 'com.google.android.gms:play-services-ads-identifier:17.1.0'
implementation 'com.android.installreferrer:installreferrer:2.2'
implementation 'com.google.android.gms:play-services-appset:16.0.0'
The repositories include the following in build.gradle:
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup 'com.facebook.react'
}
}
maven {
url 'https://maven.google.com/'
}
maven { url 'https://www.jitpack.io' }
I'm running:
"react-native": "0.70.5",
and
"expo": "^47.0.13".
Related
I've updated my Android Application gradle to use AGP 7.0
my gradle repositories resembles this
repositories {
google()
mavenCentral()
jcenter()
}
This shows that JCenter Maven repository is no longer receiving updates: newer library versions may be available elsewhere
When I remove jcenter() my build fails with this error
* What went wrong:
Execution failed for task ':app:mergeDevelopmentDebugNativeLibs'.
> Could not resolve all files for configuration ':app:developmentDebugRuntimeClasspath'.
> Could not find io.requery:sqlite-android:3.34.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/requery/sqlite-android/3.34.1/sqlite-android-3.34.1.pom
- https://repo.maven.apache.org/maven2/io/requery/sqlite-android/3.34.1/sqlite-android-3.34.1.pom
Required by:
project :app > project :background:worker > project :background:database
As my application employs api 'io.requery:sqlite-android:3.34.1'
The requery GitHub README.md file states I need to use the following gradle entry
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
However adding the above does not fix my gradle build error
Where am I going wrong?
I updated to sqlite-android:3.36.0 and stil get...
* What went wrong:
Execution failed for task ':app:mergeDevelopmentDebugNativeLibs'.
> Could not resolve all files for configuration ':app:developmentDebugRuntimeClasspath'.
> Could not find io.requery:sqlite-android:3.36.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/requery/sqlite-android/3.36.0/sqlite-android-3.36.0.pom
- https://repo.maven.apache.org/maven2/io/requery/sqlite-android/3.36.0/sqlite-android-3.36.0.pom
- https://jitpack.io/io/requery/sqlite-android/3.36.0/sqlite-android-3.36.0.pom
Required by:
project :app > project :background:worker > project :background:database
I have identified the issue
When I have this entry my build works:-
implementation 'com.github.requery:sqlite-android:3.36.0'
When I have this entry my build fails:-
api 'com.github.requery:sqlite-android:3.36.0'
When running the app on Android Studio I get this error. Please help.
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.
> Could not resolve com.google.android.gms:play-services-base:[15.0.1,16.0.0).
Required by:
project :app > com.google.android.gms:play-services-vision:15.0.2
project :app > com.google.android.gms:play-services-vision-common:15.0.2
project :app > com.google.android.gms:play-services-clearcut:15.0.1
project :app > com.google.android.gms:play-services-phenotype:15.0.1
> Failed to list versions for com.google.android.gms:play-services-base.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-base/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-base/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-base/maven-metadata.xml'. Received status code 403 from server: Forbidden
I was able to find the solution and fix it. Here's the reference if anybody needs it:
https://forums.expo.io/t/expo-sdk-34-build-error-could-not-resolve-all-files-for-configuration-debugcompileclasspath/54429/2
Change:
maven { url 'https://google.bintray.com/exoplayer' }
To
maven { url 'https://maven.google.com/web/index.html?q=exoplayer' }
I was using the 0.55.4 version of react native, after androidx update unable to build project on android.
I tried follwing solution:
Updates in gradle.properties file:
android.useAndroidX = true
android.enableJetifier = true
Use Jetifier npm module.
Updated React-Native Version to 0.60.0, update classpath 'com.android.tools.build:gradle:3.3.0' in build.gradle
and all available solution till now but still problem exist.
also tried adding following code in main buil.gradle file
subprojects { subproject ->
if (subproject.name.contains('react-native-datetime-picker') || subproject.name.contains('react-native-geolocation-service')){
buildscript {
repositories {
maven { url "https://dl.bintray.com/android/android-tools/" }
}
}
}
}
Getting following error:
In Android Studio-
ERROR: Unable to resolve dependency for ':react-native-geolocation-service#debug/compileClasspath': Could not resolve androidx.appcompat:appcompat:1.0.0.
Show Details
Affected Modules: react-native-geolocation-service
In VSCode Terminal(when running build through react-native run-android)
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not find androidx.appcompat:appcompat:28.0.0.
Required by:
project :app
project :app > project :react-native-splash-screen
project :app > project :react-native-geolocation-service
Could not find androidx.appcompat:appcompat:28.0.0.
Required by:
project :app > project :react-native-datetime-picker
Could not find androidx.appcompat:appcompat:28.0.0.
Required by:
project :app > project :Toast
Could not find androidx.appcompat:appcompat:28.0.0.
Required by:
project :app > com.facebook.react:react-native:0.60.0
Could not find androidx.appcompat:appcompat:28.0.0.
Required by:
project :app > project :react-native-image-crop-picker > com.github.yalantis:ucrop:2.2.2-native
I get the following gradle error when building the project:
Could not find com.android.databinding:baseLibrary:3.0.0-beta1.
Searched in the following locations:
Required by:
project :ConsultUIKit > project :HealthBase
Could not find com.android.databinding:baseLibrary:3.0.0-beta1.
Searched in the following locations:
Required by:
project :ConsultUIKit > project :HealthBase > com.android.databinding:library:1.3.1
project :ConsultUIKit > project :HealthBase > com.android.databinding:adapters:1.3.1
and here is my build.gradle:
dataBinding {
enabled true
}
Try adding the google() repo to your project's repositories configuration, e.g.:
repositories {
google()
}
You can read more here.
With a blank new project, I get this:
Gradle 'HelloWorld' project refresh failed
Error:Cause: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
When trying to build I get the following Gradle Build error:
Error:A problem occurred configuring root project 'HelloWorld'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:0.12.+.
Required by:
:HelloWorld:unspecified
> org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
This is a fresh installation of Android Studio, and my build.gradle looks like:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
The first lines of the relevant log error are:
org.gradle.tooling.BuildException: Could not run build action using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.12-all.zip'.
Caused by: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project 'HelloWorld'.
Caused by: org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'HelloWorld'.
Caused by: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':classpath'.
Caused by: org.gradle.api.internal.artifacts.ivyservice.ModuleVersionResolveException: Could not resolve com.android.tools.build:gradle:0.12.+.
Caused by: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
The project structure is just the default for a new project with a blank activity:
For me it look like incompatible versions. So this problem is related to this problem: Android Studio says to use Gradle 1.10 - but new version is 1.12?
Try to use gradle 1.10 and delete the the folder of the gradle wrapper.
Try mavenCentral() instead of jcenter()
Looks like this is a known issue..
https://code.google.com/p/android/issues/detail?id=73511