Tag: gradle

Android,领域,Gradle:错误:注释处理器:找不到RealmProcessor

Android Studio 2.3.3 我的项目bulid.gradle: // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.kotlin_version = '1.1.3' repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.google.gms:google-services:2.0.0-alpha6' classpath "io.realm:realm-gradle-plugin:3.5.0" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files […]

无法使用Gradle在IntelliJ Community Edition中添加应用程序服务器

我正在尝试使用spring mvc框架来构建Web服务。 我正在使用IntelliJ社区版IDE和gradle构建系统。 的build.gradle buildscript { ext { kotlinVersion = '1.1.3-2' springBootVersion = '1.5.6.RELEASE' } repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}") classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}") } } apply plugin: 'kotlin' apply plugin: 'kotlin-spring' apply plugin: 'eclipse' apply plugin: 'org.springframework.boot' version = '0.0.1-SNAPSHOT' sourceCompatibility = 1.8 compileKotlin { kotlinOptions.jvmTarget = "1.8" } compileTestKotlin { kotlinOptions.jvmTarget = "1.8" […]

Kotlin Dagger2找不到符号ApplicationModule_ProvideApplicationFactory

我试图用Kotlin使用Dagger2,但今天试图编译得到这个错误: 错误:任务':app:compileDebugJavaWithJavac'的执行失败。 错误:(5,43)错误:找不到符号类ApplicationModule_ProvideApplicationFactory (应用程序)Build.gradle apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { applicationId "com.ilyarb.geotags" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } sourceSets { main.java.srcDirs += 'src/main/kotlin' } dexOptions { javaMaxHeapSize "2048M" } } […]

应用程序:mergeDebugResources aapt错误

错误:任务':app:mergeDebugResources'的执行失败。 错误:java.util.concurrent.ExecutionException:com.android.builder.internal.aapt.AaptException: 我添加到gradle.properties – android.enableAapt2 = false,但它没有帮助 apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { flavorDimensions "versionCode" compileSdkVersion 26 defaultConfig { applicationId "com.ab.datingtrips" minSdkVersion 15 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } compileOptions { targetCompatibility 1.8 sourceCompatibility 1.8 } […]

无法创建gradle插件扩展的实例

我正在尝试使用kotlin编写gradle插件。 它应该这样工作。 同时提供配置 apply plugin: 'appenv' app { srcLink "" downloadPath "" } 它应该允许从srcLink下载文件并使用任务downloadAll将其存储在downloadAll 我创建了扩展类 open class ApplicationEnvironmentExtension { val project: Any? constructor(project: Any?) { this.project = project } var srcLink: String = "" var downloadPath: String = "" } 创建插件类 class ApplicationEnvironmentPlugin : Plugin<Project> { override fun apply(project: Project) { project.extensions.create("app", ApplicationEnvironmentExtension::class.java) project.task(mapOf ("type" […]

在apk签名时出错:无法找到

Gradle说它无法找到用于签署apk的'signingConfig()'方法。 它还列出了可能的原因: 1)项目可能使用不包含它的gradle版本。 2)构建文件可能缺少一个Gradle插件。 这是我的grade.build : apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig { applicationId "happy.blumental.maxim.testproject" minSdkVersion 14 targetSdkVersion 23 versionCode 1 versionName "1.0" multiDexEnabled true } signingConfigs { release { keyAlias('releaseKey') storeFile file('mykeystore.jks') keyPassword('key') storePassword('store') } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfigs signingConfigs.release […]

Gradle安装错误:Javadoc

我想上传一个android库自动到bintray。 我有这个应用程序gradle代码: apply plugin: 'com.android.library' apply plugin: 'kotlin-android' ext { bintrayRepo = 'maven' bintrayName = 'CurrentCenterPositionMap' publishedGroupId = 'renatamelo@patriauto.org' libraryName = 'CurrentCenterPositionMap' artifact = 'current-center-position-map' libraryDescription = 'A library to mark the center of a map with moveing animations' siteUrl = 'https://github.com/leandroBorgesFerreira/CurrentCenterPositionMap' gitUrl = 'https://github.com/leandroBorgesFerreira/CurrentCenterPositionMap.git' libraryVersion = '0.8.1' developerId = 'leandroBorgesFerreira' developerName = 'Leandro Borges […]

Beta由Crashlytics – 包似乎已损坏

我最近为客户开发了一个应用程序,现在必须在Crashlytics上分享一个Beta版本。 过去我做了很多次,但是有了这个应用程序,出现了一个问题。 当我在Crashlytics Studio的插件上传我的应用时,没有错误。 电子邮件已正确传送给测试人员。 但在安装结束时,它会显示“该软件包似乎已损坏” 。 这是我第一次看到这个,我不知道该怎么做。 我尝试所有这种类型的APK: – 调试(无符号) – 释放(无符号) – 释放(签名) 它没有工作。 这是我的build.gradle: buildscript { repositories { maven { url 'https://maven.fabric.io/public' } } dependencies { // These docs use an open ended version so that our plugin // can be updated quickly in response to Android tooling updates // We recommend […]

在Android Studio 3.0 Canary中,Gradle Sync失败

这是我的build.gradle(Project: MyProjectName)文件: // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.kotlin_version = "1.1.1" ext.supportLibVersion = "25.3.0" repositories { jcenter() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" classpath 'com.android.tools.build:gradle:3.0.0-alpha5' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } […]

找不到com.intellij.lang.properties.charset.Native2AsciiCharsetProvider

我在基于gradle IDEA中创建了一个项目,并使用spring-boot来运行我的项目。 当它开始时,我发现代码Charset.availabeCharsets()将抛出异常,指出: java.util.ServiceConfigurationError: java.nio.charset.spi.CharsetProvider: Provider com.intellij.lang.properties.charset.Native2AsciiCharsetProvider not found. 这很奇怪,因为我从来没有遇到过这个。 有谁知道为什么抛出这个异常,以及如何解决它? 是否因为在项目或Grable文件中设置不正确?