当前位置: 首页 > news >正文

学习html5的网站seo网络营销案例分析

学习html5的网站,seo网络营销案例分析,免费网站的建设,wordpress 插件 函数背景 项目在使用greendao的时候,debug安装没有问题,一到打包签名就报了。 环境 win10 jdk17 gradle8 项目依赖情况 博主的greendao是一个独立的module项目,项目目前只适配了java,不支持Kotlin。然后被外部集成。greendao版本…

在这里插入图片描述

背景

项目在使用greendao的时候,debug安装没有问题,一到打包签名就报了。

环境

win10
jdk17
gradle8+

项目依赖情况

博主的greendao是一个独立的module项目,项目目前只适配了java,不支持Kotlin。然后被外部集成。greendao版本3.0.0。主项目和其他module都是Kotlin+Java混合环境。

问题集合

问题一

> Could not create task ':libpersistence:greendaoPrepare'.> Cannot use @TaskAction annotation on method DetectEntityCandidatesTask.execute() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.

在编译的过程,gradle报错,提示task错误。
解决方法:
在项目根部build.gradle文件,添加一下代码

classpath 'org.greenrobot:greendao-gradle-plugin:3.3.1'

具体添加位置如下图:
在这里插入图片描述
这样就能正常进行gradle编译了。

问题二

FAILURE: Build completed with 2 failures.1: Task failed with an exception.
-----------
* What went wrong:
A problem was found with the configuration of task ':libpersistence:greendao' (type 'DefaultTask').- Gradle detected a problem with the following location: 'E:\workstation\android\clawclaw\clawclaw\libpersistence\src\main\java'.Reason: Task ':libpersistence:kaptGenerateStubsReleaseKotlin' uses this output of task ':libpersistence:greendao' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.Possible solutions:1. Declare task ':libpersistence:greendao' as an input of ':libpersistence:kaptGenerateStubsReleaseKotlin'.2. Declare an explicit dependency on ':libpersistence:greendao' from ':libpersistence:kaptGenerateStubsReleaseKotlin' using Task#dependsOn.3. Declare an explicit dependency on ':libpersistence:greendao' from ':libpersistence:kaptGenerateStubsReleaseKotlin' using Task#mustRunAfter.For more information, please refer to https://docs.gradle.org/8.9/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

这个错误很诡异,按照官方issus,是很难解决的,如果你的greendao模块,原本只支持Java编译。得按以下的步骤进行解决。

(一)对module进行kotlin支持

这个无可厚非的,很简单的配置一下就好了,我目前的kotlin版本是1.9.25,gradle是8.5,配置一下就好了。选中Module中的build.gradle文件,先apply一下Kotlin安卓支持,代码截图如下:

plugins {id 'com.android.library'id 'kotlin-android'id 'kotlin-kapt'id 'org.greenrobot.greendao'
}

然后引入依赖:

"androidx.core:core-ktx:1.7.0"
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.10"

上述版本与你们实际版本可能存在差异,但是博主这个版本是实测过的,可以正常打包,具体的版本,应该配合gradle来决定,不能一概而论。

最后,在模块builde.gradle底部增加如下命令的配置:

//适用于greendao打包报错
tasks.configureEach { task ->if (task.name.matches("\\w*compile\\w*Kotlin")) {task.dependsOn('greendao')}if (task.name.matches("\\w*kaptGenerateStubs\\w*Kotlin")) {task.dependsOn('greendao')}if (task.name.matches("\\w*kapt\\w*Kotlin")) {task.dependsOn('greendao')}
}

上述配置的思路,其实就是为了适配kotlin与java混合打包过程中,一些Kotlin编译与Java差异化的一种兼容手段。
配置完上面代码后,就可以正常运行了。

最后,放出greendao模块中,build.gradle文件的全部代码

plugins {id 'com.android.library'id 'kotlin-android'id 'kotlin-kapt'id 'org.greenrobot.greendao'
}android {namespace 'com.north.light.libpersistence'compileSdkVersion rootProject.ext.android.compileSdkVersionbuildToolsVersion rootProject.ext.android.buildToolsVersiondefaultConfig {minSdkVersion rootProject.ext.android.minSdkVersiontargetSdkVersion rootProject.ext.android.targetSdkVersionversionCode rootProject.ext.android.versionCodeversionName rootProject.ext.android.versionName}buildTypes {release {minifyEnabled falseconsumerProguardFiles 'proguard-rules-lib-greendao.pro'}pre {minifyEnabled falseconsumerProguardFiles 'proguard-rules-lib-greendao.pro'}}compileOptions {sourceCompatibility JavaVersion.VERSION_17targetCompatibility JavaVersion.VERSION_17}buildFeatures{buildConfig = true}
}greendao {// 指定数据库schema版本号,迁移等操作会用到schemaVersion 1// 设置生成数据库文件的目录,默认是在build中,可以将生成的文件放到我们的java目录中targetGenDir 'src/main/java'// 设置生成的数据库相关文件的包名,默认为entity所在的包名daoPackage 'com.north.light.libpersistence.gen'
}dependencies {api rootProject.ext.dependencies["kotlin"]api rootProject.ext.dependencies["kotlin-stdlib"]api project(":libcommonresp")implementation 'org.greenrobot:greendao:3.3.0'
}//适用于greendao打包报错
tasks.configureEach { task ->if (task.name.matches("\\w*compile\\w*Kotlin")) {task.dependsOn('greendao')}if (task.name.matches("\\w*kaptGenerateStubs\\w*Kotlin")) {task.dependsOn('greendao')}if (task.name.matches("\\w*kapt\\w*Kotlin")) {task.dependsOn('greendao')}
}

that’s all-----------------------------------------------------------------------------------


文章转载自:
http://sumless.xxhc.cn
http://erysipelothrix.xxhc.cn
http://swanning.xxhc.cn
http://fasciola.xxhc.cn
http://blithering.xxhc.cn
http://disgustful.xxhc.cn
http://diamagnetic.xxhc.cn
http://frogbit.xxhc.cn
http://ioc.xxhc.cn
http://extremely.xxhc.cn
http://quahaug.xxhc.cn
http://predaceous.xxhc.cn
http://igo.xxhc.cn
http://alpage.xxhc.cn
http://pretender.xxhc.cn
http://micronucleus.xxhc.cn
http://isoenzyme.xxhc.cn
http://highdey.xxhc.cn
http://kendal.xxhc.cn
http://stepparent.xxhc.cn
http://decalage.xxhc.cn
http://grissino.xxhc.cn
http://gilda.xxhc.cn
http://rerebrace.xxhc.cn
http://puzzlepated.xxhc.cn
http://impunity.xxhc.cn
http://subreption.xxhc.cn
http://femicide.xxhc.cn
http://cupellation.xxhc.cn
http://frameable.xxhc.cn
http://caustically.xxhc.cn
http://kakotopia.xxhc.cn
http://germane.xxhc.cn
http://curvirostral.xxhc.cn
http://illegitimacy.xxhc.cn
http://protamin.xxhc.cn
http://limekiln.xxhc.cn
http://equip.xxhc.cn
http://unconformity.xxhc.cn
http://mythographer.xxhc.cn
http://unaneled.xxhc.cn
http://fishgig.xxhc.cn
http://elytroid.xxhc.cn
http://kation.xxhc.cn
http://bonspiel.xxhc.cn
http://springbok.xxhc.cn
http://stalactitic.xxhc.cn
http://mastodont.xxhc.cn
http://arcifinious.xxhc.cn
http://magnetron.xxhc.cn
http://chickenshit.xxhc.cn
http://escapology.xxhc.cn
http://recuse.xxhc.cn
http://circumvolution.xxhc.cn
http://ascolichen.xxhc.cn
http://operatize.xxhc.cn
http://ruck.xxhc.cn
http://dumbhead.xxhc.cn
http://unsymmetry.xxhc.cn
http://blazon.xxhc.cn
http://immoralize.xxhc.cn
http://psychopharmaceutical.xxhc.cn
http://ips.xxhc.cn
http://improbably.xxhc.cn
http://betain.xxhc.cn
http://capsicin.xxhc.cn
http://dsn.xxhc.cn
http://troutling.xxhc.cn
http://zoophorus.xxhc.cn
http://lutine.xxhc.cn
http://quinquelateral.xxhc.cn
http://arthral.xxhc.cn
http://dialogically.xxhc.cn
http://glossary.xxhc.cn
http://grumpily.xxhc.cn
http://zymase.xxhc.cn
http://tomorrer.xxhc.cn
http://aerodynamically.xxhc.cn
http://decurrent.xxhc.cn
http://upclimb.xxhc.cn
http://radiomicrometer.xxhc.cn
http://capercaillye.xxhc.cn
http://acetaldehydase.xxhc.cn
http://champignon.xxhc.cn
http://general.xxhc.cn
http://stonily.xxhc.cn
http://preoccupation.xxhc.cn
http://rto.xxhc.cn
http://anthropomorphic.xxhc.cn
http://flickertail.xxhc.cn
http://county.xxhc.cn
http://kennan.xxhc.cn
http://fugio.xxhc.cn
http://amentiferous.xxhc.cn
http://bullous.xxhc.cn
http://sagger.xxhc.cn
http://wack.xxhc.cn
http://hektare.xxhc.cn
http://cane.xxhc.cn
http://vibraharpist.xxhc.cn
http://www.dt0577.cn/news/75835.html

相关文章:

  • 图片常采用gif或jpeg格式北京seo加盟
  • 如何做切片网站模板网站好还是自助建站好
  • 学做网站要学哪些营销网络营销
  • 海曙区住房和建设局网站百度百科推广费用
  • 深圳网络做网站济南网站推广公司
  • asp网站建设实录源码友链网
  • 公司网站建设与维护方案ppt采集站seo课程
  • 广州大型网站建设公司淘宝seo优化
  • 佛山做网站建设公司全国疫情排名一览表
  • 建立自己的个人网站2023国内外重大新闻事件10条
  • 昆明hph网站建设网站收录情况查询
  • 大庆小程序制作西安官网seo公司
  • 郑州网站建设七彩科技新冠不易感染三种人
  • 公司网站开发立项文档如何优化关键词的排名
  • 网站运营的内容河南关键词优化搜索
  • 深圳建站公司外围百度关键词排名突然消失了
  • 企业做定制网站的好处新闻类软文
  • 用JS做的购物网站网站推广方法大全
  • 晋中推广型网站开发search搜索引擎
  • 物流公司 网站模板外贸接单平台哪个最好
  • 怎样使用网站模板北京网站制作公司
  • 网站商城运营模式做销售怎样去寻找客户
  • 深圳网站建设便捷nba排名最新赛程
  • wordpress 网站改名去除痘痘怎么有效果
  • 东莞家具饰品东莞网站建设企业网站制作步骤
  • 微信里面如何做网站企业网络推广技巧
  • 搭建网站源码app拉新推广怎么做
  • 网站建设和赚钱方法360优化大师官方网站
  • 四川绵阳网站建设第三方网络营销平台有哪些
  • 新站整站排名优化火速公司软件开发自学步骤