我该如何解决“错误:找不到net.simonvt.schematic:-compiler:0.6.3。”

时间:2019-10-18 00:31:21

标签: android android-studio

错误:找不到net.simonvt.schematic:-compiler:0.6.3。 在以下位置搜索:   -https://dl.google.com/dl/android/maven2/net/simonvt/schematic/-compiler/0.6.3/-compiler-0.6.3.pom   -https://dl.google.com/dl/android/maven2/net/simonvt/schematic/-compiler/0.6.3/-compiler-0.6.3.jar   -https://jcenter.bintray.com/net/simonvt/schematic/-compiler/0.6.3/-compiler-0.6.3.pom   -https://jcenter.bintray.com/net/simonvt/schematic/-compiler/0.6.3/-compiler-0.6.3.jar 要求:     项目:app

我试图更改版本并更改项目位置以缩短路径长度

应用插件:“ com.android.application” 应用插件:“ android-apt”

android {     编译版本28     buildToolsVersion“ 28.0.3”     defaultConfig {         applicationId“ android.example.com.squawker”         minSdkVersion 16         targetSdkVersion 28         版本代码1         versionName“ 1.0”         testInstrumentationRunner“ android.support.test.runner.AndroidJUnitRunner”     }     buildTypes {         发布 {             minifyEnabled false             proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'         }     } }

依赖项{     实现fileTree(dir:'libs',包括:['* .jar'])     androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2',{         排除组:“ com.android.support”,模块:“ support-annotations”     })     实施'com.android.support:appcompat-v7:28.0.0'     testImplementation'junit:junit:4.12'

// RecyclerView
implementation 'com.android.support:recyclerview-v7:28.0.0'

// Schematic dependencies for ContentProvider
apt 'net.simonvt.schematic:-compiler:0.6.3'
implementation 'net.simonvt.schematic:schematic:0.6.3'

// Preferences Dependencies
implementation 'com.android.support:preference-v7:28.0.0'

}

应用插件:“ com.android.application” 应用插件:“ android-apt”

android {     编译版本28     buildToolsVersion“ 28.0.3”     defaultConfig {         applicationId“ android.example.com.squawker”         minSdkVersion 16         targetSdkVersion 28         版本代码1         versionName“ 1.0”         testInstrumentationRunner“ android.support.test.runner.AndroidJUnitRunner”     }     buildTypes {         发布 {             minifyEnabled false             proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'         }     } }

依赖项{     实现fileTree(dir:'libs',包括:['* .jar'])     androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2',{         排除组:“ com.android.support”,模块:“ support-annotations”     })     实施'com.android.support:appcompat-v7:28.0.0'     testImplementation'junit:junit:4.12'

// RecyclerView
implementation 'com.android.support:recyclerview-v7:28.0.0'

// Schematic dependencies for ContentProvider
apt 'net.simonvt.schematic:-compiler:0.6.3'
implementation 'net.simonvt.schematic:schematic:0.6.3'

// Preferences Dependencies
implementation 'com.android.support:preference-v7:28.0.0'

} enter image description here

2 个答案:

答案 0 :(得分:0)

看起来您的依赖路径错误。您可以尝试将依赖项块更改为:

annotationProcessor 'net.simonvt.schematic:schematic-compiler:0.6.3'
compile 'net.simonvt.schematic:schematic:0.6.3'

请注意,它应该是schematic-compiler,而不是-compiler

答案 1 :(得分:0)

项目级别“ build.gradle”删除此行:

classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2'

应用程序级别“ build.gradle”删除此行:

apply plugin: 'android-apt'

,并更改此行,用aptationProcessor替换apt:

apt 'net.simonvt.schematic:schematic-compiler:0.6.3'