Я работаю над проектом с GluonMobile. Недавно я добавил несколько android-ресурсов в android-модуль. После этого я не смог запустить сборку Android (apkDebug, ...), потому что произошла следующая ошибка:
[...]
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':[project-name]:mergeAndroidAssets'.
> There were multiple failures while executing work items
> A failure occurred while executing com.android.ide.common.res2.MergedAssetWriter$AssetWorkAction
> Could not create an instance of type com.android.ide.common.res2.MergedAssetWriter$AssetWorkAction.
> The constructor for class com.android.ide.common.res2.MergedAssetWriter$AssetWorkAction should be annotated with @Inject.
> A failure occurred while executing com.android.ide.common.res2.MergedAssetWriter$AssetWorkAction
> Could not create an instance of type com.android.ide.common.res2.MergedAssetWriter$AssetWorkAction.
> The constructor for class com.android.ide.common.res2.MergedAssetWriter$AssetWorkAction should be annotated with @Inject.
> A failure occurred while executing com.android.ide.common.res2.MergedAssetWriter$AssetWorkAction
> Could not create an instance of type com.android.ide.common.res2.MergedAssetWriter$AssetWorkAction.
> The constructor for class com.android.ide.common.res2.MergedAssetWriter$AssetWorkAction should be annotated with @Inject.
Вот отрывок из моего build.gradle:
buildscript {
repositories {
mavenCentral()
jcenter()
google()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:+'
classpath 'com.github.jengelman.gradle.plugins:shadow:+'
}
}
apply plugin: 'org.javafxports.jfxmobile'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'idea'
repositories {
mavenCentral()
jcenter()
google()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
maven {
url uri('libs')
}
}
mainClassName = '[...].main.Main'
version = '2.0_Alpha'
dependencies {
compile 'com.gluonhq:charm:+'
compile 'com.gluonhq:glisten-afterburner:+'
[...]
}
jfxmobile {
downConfig {
version = '+'
// Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
//noinspection GroovyAssignabilityCheck
plugins 'browser', 'connectivity', 'display', 'lifecycle', 'statusbar', 'storage'
}
android {
manifest = 'src/android/AndroidManifest.xml'
compileSdkVersion = 28
targetSdkVersion = 22
minSdkVersion = 16
}
}
[...]
(я знаю, вы не должны использовать версии '+', но у меня это просыпается.)
Кто-нибудь знает, как решить эту проблему?
Спасибо