0

I am trying to follow this tutorial for AWS Amplify Android.

I am sure I did everything mentioned over there.

This is how my Gradle files look like.

My project Gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.0'
        classpath 'com.amplifyframework:amplify-tools-gradle-plugin:1.0.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

apply plugin: 'com.amplifyframework.amplifytools'

This is my app Gradle file:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        applicationId "com.example.demoapp"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    implementation 'com.amplifyframework:core:1.0.0'
    implementation 'com.amplifyframework:aws-datastore:1.0.0'
    implementation 'com.amplifyframework:aws-api:1.0.0'
}

As soon as i remove apply plugin: 'com.amplifyframework.amplifytools', it builds successfully.

My node version is 12.17.0.

npm version is 16.14.4.

node js version and npm version cmd image

It is giving me this errors:

EEXIST: file already exists, mkdir 'C:\Users\Ram'

Node.js is not installed. Visit https://nodejs.org/en/download/ to install it.
Jameson
  • 6,400
  • 6
  • 32
  • 53
  • I think this is a duplicate of https://stackoverflow.com/questions/62575787/node-js-is-not-installed-while-trying-to-integrate-android-studio-to-aws which points to this GitHub issue on the Amplify project: https://github.com/aws-amplify/amplify-android/issues/531 – Jameson Jul 01 '20 at 15:04

1 Answers1

0

You can file this as an issue against our GitHub repo here and we'll take a look: https://github.com/aws-amplify/amplify-android

David Daudelin
  • 611
  • 1
  • 6
  • 17