0

I hired a programmer to do an app. When he delivered me the source code I cannot run the application. Bellow is what is showed to me on Console Panel.

Launching lib\main.dart on LM K410 in debug mode...
Running Gradle task 'assembleDebug'...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: elemento inesperado (uri:"", local:"base-extension"). Os elementos esperados s�o <{}codename>,<{}layoutlib>,<{}api-level>

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
   > com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "C:\Users\raulp\.android\debug.keystore": Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available

* 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 44s
Exception: Gradle task assembleDebug failed with exit code 1

I have no idea whats is happening.

I followed the indication of @liam spiegel and the error changed

Running "flutter pub get" in local_prose_latest_24_Feb...
Launching lib\main.dart on LM K410 in debug mode...
Running Gradle task 'assembleDebug'...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: elemento inesperado (uri:"", local:"base-extension"). Os elementos esperados s�o <{}codename>,<{}layoutlib>,<{}api-level>
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\geocoding-2.0.2\android\src\main\java\com\baseflow\geocoding\GeocodingPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in-5.2.3\android\src\main\java\io\flutter\plugins\googlesignin\GoogleSignInPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
   > com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "C:\Users\raulp\.android\debug.keystore": Integrity check failed: java.security.NoSuchAlgorithmException: Algorithm HmacPBESHA256 not available

* 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 1m 26s
Exception: Gradle task assembleDebug failed with exit code 1

My build.gradle file Located in \android\app\ in signingConfig signingConfigs.debug I added \ comment

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"
apply plugin: 'com.google.gms.google-services'
android {
    compileSdkVersion 31

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.local_prose.app"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

    buildTypes {
       release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
       }
    }
}

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation platform('com.google.firebase:firebase-bom:29.0.4')
}

@fravolt, @Lalit Fauzdar and @liam spiegel thank you for yours help. I have to hire another developer.

I found a solution, I went to C:\Users\raulp(my user name).android and deleted debug.keystore file. Automatically was generated a new one during Android Studio run and thing worked. Again thanks for yours help.

2
  • It looks like the project is set up to use a key to build with, if you look inside your android/app/build.gradle file, it should mention a signingConfig with a key. I guess you could remove it (as for a local debug version, no key should be required AFAIK), but I may be wrong. Commented Mar 18, 2022 at 16:03
  • An android project when run/built use Signing Key details to keep it associated with a developer, your developer used his keys to run/build it and now, as the details are saved in the configuration file (build.gradle (app level)), and as you don't have the key at the specified location C:\Users\raulp\.android\debug.keystore, what you can do is just remove this signing configuration from build.gradle (app level) file and you can run the app. For Release build, you'll have to set a key. Commented Mar 18, 2022 at 18:34

3 Answers 3

0

Please run: flutter clean and try again.

I found the Solution here: https://github.com/flutter/flutter/issues/63771#issuecomment-674298517 and here: https://stackoverflow.com/a/61926026/16241837.

Hope it helps!

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your help. I typed "flutter clean" and no issues was found. But when I typed "flutter run -v" the problem persist.
0

Clean and Rebuild project should work. It work for me.Otherwise delete the build project folder inside the app folder .

Comments

-1

step 1, change from minSdkVersion 21 targetSdkVersion 29 to minSdkVersion 20 targetSdkVersion 31 where build-gradle file(app<build.gradle)

step 2,

set your kotlin level to 1.6.0 from here

step 3, apply settings from File<Project Structure from here

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.