The problem seems to be my PC, because in my other pc , there is no problem with Build. Tried everything but the problem still exist. pls help!!
Erros:
- What went wrong: Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find androidsensorcore-1.2.7.aar (it.sapienzaapps.seismocloud:androidsensorcore:1.2.7). Searched in the following locations: https://git.sapienzaapps.it/api/v4/projects/160/packages/maven/it/sapienzaapps/seismocloud/androidsensorcore/1.2.7/androidsensorcore-1.2.7.aar
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.
Get more help at https://help.gradle.org
BUILD FAILED in 12s Exception: Gradle task assembleDebug failed with exit code 1
my 2 build.grade:
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
signingConfigs {
debugkeystore {
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile rootProject.file('debug.keystore')
storePassword 'android'
}
releasekeystore {
keyAlias 'seismocloud'
keyPassword 'seismocloud'
storeFile rootProject.file('../secrets/seismocloud.jks')
storePassword 'seismocloud'
}
}
compileSdkVersion 31
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "it.sapienzaapps.seismocloud"
minSdkVersion 25
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
signingConfig signingConfigs.debugkeystore
manifestPlaceholders = [
'appAuthRedirectScheme': 'seismocloud'
]
}
buildTypes {
release {
//minifyEnabled false
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.releasekeystore
}
debug {
signingConfig signingConfigs.debugkeystore
}
profile {
signingConfig signingConfigs.debugkeystore
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "it.sapienzaapps.seismocloud:androidsensorcore:1.2.7"
}
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
maven {
url "https://git.sapienzaapps.it/api/v4/projects/160/packages/maven"
name "GitLab"
credentials(HttpHeaderCredentials) {
name = 'Deploy-Token'
value = 'hwxX4_C7pd-MW_2Kk236'
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}