我使用方面,問題出來時,從2.2.3升級到2.2.0到2.3.0 在這一行:Android方面沒有這樣的屬性:類的項目:com.android.build.gradle.LibraryPlugin
"-bootclasspath", plugin.project.android.bootClasspath.join(
File.pathSeparator)]
這裏是滿的build.gradle
android.libraryVariants.all { variant ->
LibraryPlugin plugin = project.plugins.getPlugin(LibraryPlugin)
JavaCompile javaCompile = variant.javaCompile
javaCompile.doLast {
String[] args = ["-showWeaveInfo",
"-1.5",
"-inpath", javaCompile.destinationDir.toString(),
"-aspectpath", javaCompile.classpath.asPath,
"-d", javaCompile.destinationDir.toString(),
"-classpath", javaCompile.classpath.asPath,
"-bootclasspath", plugin.project.android.bootClasspath.join(
File.pathSeparator)]
MessageHandler handler = new MessageHandler(true);
new Main().run(args, handler)
def log = project.logger
for (IMessage message : handler.getMessages(null, true)) {
switch (message.getKind()) {
case IMessage.ABORT:
case IMessage.ERROR:
case IMessage.FAIL:
log.error message.message, message.thrown
break;
case IMessage.WARNING:
case IMessage.INFO:
log.info message.message, message.thrown
break;
case IMessage.DEBUG:
log.debug message.message, message.thrown
break;
}
}
}
}
以下是錯誤
11:14:38.176 [ERROR]
[org.gradle.internal.buildevents.BuildExceptionReporter] Build file '************/build.gradle' line: 42
11:14:38.176 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
11:14:38.176 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
11:14:38.176 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':yfdaq:compileReleaseJavaWithJavac'.
11:14:38.176 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > No such property: project for class: com.android.build.gradle.LibraryPlugin
11:14:38.176 [ERROR]
我有同樣的錯誤,任何一個能幫助?這是參考鏈接https://fernandocejas.com/2014/08/03/aspect-oriented-programming-in-android/和引用這個github存儲庫https://github.com/android10/Android-AOPExample當我嘗試在我的項目中合併gintonic庫模塊這給我同樣的錯誤 –