Reputation: 71
I would like to publish my app in the Google Play Store, but I am failing to create the required "app-release.apk". The error I get is the following:
Could not find org.jetbrains.trove4j:trove4j:20160824. Searched in the following locations:
file:/C:/Users/Albrecht/AppData/Local/Android/Sdk/extras/m2repository/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
file:/C:/Users/Albrecht/AppData/Local/Android/Sdk/extras/m2repository/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
file:/C:/Users/Albrecht/AppData/Local/Android/Sdk/extras/google/m2repository/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
file:/C:/Users/Albrecht/AppData/Local/Android/Sdk/extras/google/m2repository/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
file:/C:/Users/Albrecht/AppData/Local/Android/Sdk/extras/android/m2repository/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
file:/C:/Users/Albrecht/AppData/Local/Android/Sdk/extras/android/m2repository/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
file:/C:/Users/Albrecht/.m2/repository/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
file:/C:/Users/Albrecht/.m2/repository/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
https://oss.sonatype.org/content/repositories/snapshots/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
https://oss.sonatype.org/content/repositories/snapshots/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
https://oss.sonatype.org/content/repositories/releases/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
https://oss.sonatype.org/content/repositories/releases/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
https://maven.google.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
https://maven.google.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
Required by:
project :android > com.android.tools.lint:lint-gradle:26.1.4 > com.android.tools.external.com-intellij:intellij-core:26.1.4
My build.gradle file:
buildscript {
repositories {
mavenLocal()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://maven.google.com" }
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:3.2.1'
}
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = '1.0'
ext {
appName = "ShapeRecognisingGame"
gdxVersion = '1.9.8'
roboVMVersion = '2.3.3'
box2DLightsVersion = '1.4'
ashleyVersion = '1.7.3'
aiVersion = '1.8.0'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url "https://maven.google.com" }
}
}
project(":desktop") {
apply plugin: "java"
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
}
}
project(":android") {
apply plugin: "android"
configurations { natives }
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
compile "com.google.android.gms:play-services-ads:15.0.1"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86_64"
}
}
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
}
}
I have already checked out several other solutions for this error. However, none of them worked for me.
Upvotes: 3
Views: 299
Reputation: 1566
I was getting the error as well and with LibGDX as well. Android Studio APK signing with LibGDX seems to be dependent on this library and unable to resolve it with default setup. After some laboring, the thing that seems to have helped is File - Settings - Build, Execution, Deployment - Gradle - Android Studio - Enable embedded Maven repository.
By the way, creating the new "bundle" instead of APK works out of the box without problems.
Upvotes: 1