0

从标题可以看出,我是安卓新手。我正在使用 Android studio 4.1.2 并尝试测试一个旧应用程序(因为我正在学习的 android 课程很旧,但到目前为止它一直很有用)。无论如何,我在堆栈流上看到了很多具有相同错误的问题,并且我尝试实现人们提供的每个解决方案,但没有一个对我有用。有没有善良的灵魂可以帮助我?这是我的毕业生:

项目:

plugins {
   id 'com.android.application'
}

android {
   compileSdkVersion 30
   buildToolsVersion "30.0.3"

   defaultConfig {
       applicationId "com.app.persistencia"
       minSdkVersion 16
       targetSdkVersion 30
       versionCode 1
       versionName "1.0"
       testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
   }

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

dependencies {
   implementation 'androidx.appcompat:appcompat:1.3.0'
   implementation 'com.google.android.material:material:1.3.0'
   implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
   testImplementation 'junit:junit:4.+'
   androidTestImplementation 'androidx.test.ext:junit:1.1.2'
   androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
   apply plugin: 'realm-android'
}

模块:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
   repositories {
       google()
       jcenter()
   }
   dependencies {
       classpath "com.android.tools.build:gradle:4.1.2"
       classpath "io.realm:realm-gradle-plugin:1.2.0"
       // NOTE: Do not place your application dependencies here; they belong
       // in the individual module build.gradle files
   }
}

allprojects {
   repositories {
       google()
       jcenter()

   }
}

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

提前致谢

4

0 回答 0