我正在尝试关注this tutorial for AWS Amplify Android。
我确定我做了那边提到的一切。
这是我的Gradle文件的外观
我的项目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'
这是我的应用Gradle文件:
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'
}
一旦我删除apply plugin: 'com.amplifyframework.amplifytools'
,它就会成功构建。
我的节点版本为12.17.0
Npm版本是16.14.4
node js version and npm version cmd image
它给我这个错误:
EEXIST: file already exists, mkdir 'C:\Users\Ram'
Node.js is not installed. Visit https://nodejs.org/en/download/ to install it.
Open File
感谢您参加Amplify的旋转。我可以尝试帮助您。您能否提供几个其他项目:
npx amplify-app --version
到目前为止,我们已尝试重现错误,但未成功,因此,此附加信息可能有助于我们进行故障排除。