Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Build failed with an exception react native AAB or APK bundle

$
0
0

I try all this steps https://reactnative.dev/docs/signed-apk-android and I recive this

FAILURE: Build failed with an exception.
  • Where:Build file 'C:...\android\app\build.gradle' line: 138

  • What went wrong:Could not compile build file 'C:...\android\app\build.gradle'.

startup failed:build file 'C:...\android\app\build.gradle': 138: Unexpected input: '{' @ line 138, column 9.android {^

1 error

  • 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.

BUILD FAILED in 8s6 actionable tasks: 6 up-to-date

My code

    android {    ...    defaultConfig { ... }signingConfigs {        debug {            storeFile file('debug.keystore')            storePassword 'android'            keyAlias 'androiddebugkey'            keyPassword 'android'        }         release {            if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {                storeFile file(MYAPP_UPLOAD_STORE_FILE)                storePassword MYAPP_UPLOAD_STORE_PASSWORD                keyAlias MYAPP_UPLOAD_KEY_ALIAS                keyPassword MYAPP_UPLOAD_KEY_PASSWORD            }}buildTypes {    debug {        signingConfig signingConfigs.debug    }    release {        // Caution! In production, you need to generate your own keystore file.        // see https://reactnative.dev/docs/signed-apk-android.        signingConfig signingConfigs.release        minifyEnabled enableProguardInReleaseBuilds        proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"    }}

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>