hello everyone, since the last update of expo, i can’t produce any apk, each time I try i got this message error:
[stderr]
FAILURE: Build completed with 2 failures.
[stderr]
1: Task failed with an exception.
[stderr]
-----------
[stderr]
* Where:
[stderr]
Build file '/home/expo/workingdir/build/node_modules/expo-device/android/build.gradle' line: 40
[stderr]
* What went wrong:
[stderr]
A problem occurred evaluating project ':expo-device'.
[stderr]
> Could not set unknown property 'classifier' for task ':expo-device:androidSourcesJar' of type org.gradle.api.tasks.bundling.Jar.
[stderr]
* Try:
[stderr]
> Run with --stacktrace option to get the stack trace.
[stderr]
> Run with --info or --debug option to get more log output.
[stderr]
> Run with --scan to get full insights.
[stderr]
==============================================================================
[stderr]
2: Task failed with an exception.
[stderr]
-----------
[stderr]
* What went wrong:
[stderr]
A problem occurred configuring project ':expo'.
[stderr]
> compileSdkVersion is not specified. Please add it to build.gradle
[stderr]
* Try:
[stderr]
> Run with --stacktrace option to get the stack trace.
[stderr]
> Run with --info or --debug option to get more log output.
[stderr]
> Run with --scan to get full insights.
[stderr]
==============================================================================
[stderr]
* Get more help at https://help.gradle.org
[stderr]
BUILD FAILED in 2m 5s
5 actionable tasks: 5 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
but my builde.grade looks lith this:
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'maven-publish'
group = 'host.exp.exponent'
version = '5.0.0'
buildscript {
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
if (expoModulesCorePlugin.exists()) {
apply from: expoModulesCorePlugin
applyKotlinExpoModulesCorePlugin()
}
// Simple helper that allows the root project to override versions declared by this library.
ext.safeExtGet = { prop, fallback ->
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
// Ensures backward compatibility
ext.getKotlinVersion = {
if (ext.has("kotlinVersion")) {
ext.kotlinVersion()
} else {
ext.safeExtGet("kotlinVersion", "1.6.10")
}
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
}
}
tasks.register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from(sourceSets.main.get().allJava)
manifest = project.the<JavaPluginConvention>().manifest {
from(sharedManifest)
}
}
tasks.register<Jar>("javadocJar") {
archiveClassifier.set("javadoc")
dependsOn("javadoc")
from(tasks.javadoc.get().destinationDir)
manifest = project.the<JavaPluginConvention>().manifest {
from(sharedManifest)
}
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
// Add additional sourcesJar to artifacts
artifact(androidSourcesJar)
}
}
repositories {
maven {
url = mavenLocal().url
}
}
}
}
android {
compileSdkVersion safeExtGet("compileSdkVersion", 31)
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 31)
versionCode 12
versionName '5.0.0'
}
lintOptions {
abortOnError false
}
}
dependencies {
implementation project(':expo-modules-core')
api 'com.facebook.device.yearclass:yearclass:2.1.0'
api "androidx.legacy:legacy-support-v4:1.0.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
}
I really don't understand the problem here, this build.gradle are in C:\users\(myusername)\desktop\project\gestionled\node_modules\expo-device\android
did i modify the correct file? because the link in the message error say /home/expo/workingdir/build/node_modules/expo-device/android/build.gradle' line: 40 so i'm lost. Any help will be helpful ^^