如何在Android应用中实现设计库?

问题描述 投票:0回答:1

我不会在我的项目中实现此设计库>https://developer.android.com/topic/libraries/support-library/packages.html#design(com.android.support:design:28.0.0)。但是,当我同步时,我得到了一个错误:无法获得类型为org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler的对象的未知属性'com'。请帮忙。谢谢:)


android {
  compileSdkVersion 29
  buildToolsVersion "29.0.3"
  defaultConfig {
      applicationId "com.example.pyramid"
      minSdkVersion 15
      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.12'
  androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  implementation 'com.google.android.material:material:1.1.0'
  implementation 'com.android.support.design:28.0.0'

java android android-design-library
1个回答
0
投票

好吧,我认为已经解决了。我只是将所有库从带有Bottom Navigation Activity的第二个项目复制到了我的第一个项目。全部都是:)

© www.soinside.com 2019 - 2024. All rights reserved.