e2lc5's blog

e2lc5's blog

CertBot增加域名

查询当前所有域名

1
2
3
4
5
6
7
8
9
10
11
12
[root@iZj6cgoyl5x6opizfwaukrZ ~]# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
Certificate Name: 123.com
Serial Number: 44365432b76836764e9e41b30da3a4faaba
Domains: 123.com
Expiry Date: 2020-12-30 14:26:28+00:00 (VALID: 53 days)
Certificate Path: /etc/letsencrypt/live/123.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/123.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

如果你想删除一个域名

1
2
sudo certbot revoke --cert-name 123.com
sudo certbot revoke --cert-path /etc/letsencrypt/live/123.com/

如果你想增加一个域名的https

1
sudo certbot -d your.new.tld --expand

卸装

  1. yum检查安装方式
    查看yum是否安装过mysql
    yum list installed mysql*
    如或显示了列表,说明系统中有MySQL
  • yum卸装

    1
    2
    yum remove mysql-community-client mysql-community-common mysql-community-libs
    mysql-community-libs-compat mysql-community-server mysql57-community-release
  • rpm查看安装

    1
    rpm -qa | grep -i mysql
  • rpm卸装

    1
    2
    3
    4
    5
    6
    rpm -e mysql57-community-release-el7-9.noarch
    rpm -e mysql-community-server-5.7.17-1.el7.x86_64
    rpm -e mysql-community-libs-5.7.17-1.el7.x86_64
    rpm -e mysql-community-libs-compat-5.7.17-1.el7.x86_64
    rpm -e mysql-community-common-5.7.17-1.el7.x86_64
    rpm -e mysql-community-client-5.7.17-1.el7.x86_64
  • 清理残余

    1
    whereis mysql或find / -name mysql 删除文件
  • 删除配置

    1
    2
    rm –rf /usr/my.cnf
    rm -rf /root/.mysql_sercret
  • 剩余配置检查

    1
    2
    chkconfig --list | grep -i mysql
    chkconfig --del mysqld

安装

  • 安装repo
    1
    https://dev.mysql.com/downloads/repo/yum/
  • 下载并安装
    1
    2
    wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
    yum localinstall mysql57-community-release-el7-8.noarch.rpm
  • 检查mysql源是否安装成功
    yum repolist enabled | grep "mysql.*-community.*"
  1. 修改 vim /etc/yum.repos.d/mysql-community.repo源 ,改变默认安装的mysql版本。比如要安装5.6版本,将5.7源的enabled=1改成enabled=0。然后再将5.6源的enabled=0改成enabled=1即可。改完后保存 按ESC 后 按 shift + : 输入 wq 保存退出
  • 安装MySQL
    yum install mysql-community-server
  • 启动MySQL服务
    systemctl start mysqld
  • 开机启动
    systemctl enable mysqld
  • 修改root本地登录密码
    grep 'temporary password' /var/log/mysqld.log

今天还是决定使用AS 4.0

1
2
3
4
5
6
7
8
9
10
11
Unable to find method 'org.gradle.api.tasks.TaskInputs.property(Ljava/lang/String;Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputs;'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

解决方法:降级gradle插件到3.6.3 降级gradle到5.6.4

也有greendao的问题


classpath ‘org.greenrobot:greendao-gradle-plugin:3.2.2’
升级至
classpath ‘org.greenrobot:greendao-gradle-plugin:3.3.0’
即可解决

修改生成apk的路径

修改输出的文件夹位置

1
2
3
4
5
6
7
8
9
10
D:\Project\AS\Label\app\src\main\java\com\tscale\ttouch\label\di\component\AppComponent.java:36: 错误: [Dagger/MissingBinding] [dagger.android.AndroidInjector.inject(T)] com.tscale.ttouch.label.ui.function.FunctionActivity cannot be provided without an @Inject constructor or an @Provides-annotated method. This type supports members injection but cannot be implicitly provided.
public interface AppComponent {
^
A binding with matching key exists in component: com.tscale.ttouch.label.di.builder.ActivityBuilder_BindFunctionActivity.FunctionActivitySubcomponent
com.tscale.ttouch.label.ui.function.FunctionActivity is injected at
com.tscale.ttouch.label.ui.fragment.setting.ad.video.ADVideoFragmentModule.provideGridLayoutManager(activity)
androidx.recyclerview.widget.GridLayoutManager is injected at
com.tscale.ttouch.label.ui.fragment.setting.ad.video.ADVideoFragment.mGridLayoutManager
com.tscale.ttouch.label.ui.fragment.setting.ad.video.ADVideoFragment is injected at
dagger.android.AndroidInjector.inject(T)

这个问题是因为FunctionActivity错误,应该为SettingActivity

今天使用dagger时遇到一个错误,提示完全不知所云

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
D:\Project\AS\Label\app\src\main\java\com\xxx\xxx\label\LabelApp.java:44: 错误: 找不到符号  
import com.xxx.xxx.label.di.component.DaggerAppComponent;
^
符号: 类 DaggerAppComponent
位置: 程序包 com.xxx.xxx.label.di.component
D:\Project\AS\Label\app\src\main\java\com\xxx\xxx\label\di\component\AppComponent.java:36: 错误: [Dagger/MapKeys] [dagger.android.AndroidInjector.inject(T)] The same map key is bound more than once for java.util.Map<java.lang.Class<? extends androidx.fragment.app.Fragment>,javax.inject.Provider<dagger.android.AndroidInjector.Factory<? extends androidx.fragment.app.Fragment>>>
public interface AppComponent {
^
@Binds @dagger.multibindings.IntoMap @dagger.android.support.FragmentKey(com.xxx.xxx.label.ui.fragment.menu.MenuFragment.class) dagger.android.AndroidInjector.Factory<? extends androidx.fragment.app.Fragment> com.xxx.xxx.label.ui.fragment.product.item.ItemInfoFragmentProvider_ProvideMenuFragmentFactory.bindAndroidInjectorFactory(com.xxx.xxx.label.ui.fragment.product.item.ItemInfoFragmentProvider_ProvideMenuFragmentFactory.MenuFragmentSubcomponent.Builder)
@Binds @dagger.multibindings.IntoMap @dagger.android.support.FragmentKey(com.xxx.xxx.label.ui.fragment.menu.MenuFragment.class) dagger.android.AndroidInjector.Factory<? extends androidx.fragment.app.Fragment> com.xxx.xxx.label.ui.fragment.product.category.CategoryFragmentProvider_ProvideMenuFragmentFactory.bindAndroidInjectorFactory(com.xxx.xxx.label.ui.fragment.product.category.CategoryFragmentProvider_ProvideMenuFragmentFactory.MenuFragmentSubcomponent.Builder)
java.util.Map<java.lang.Class<? extends androidx.fragment.app.Fragment>,javax.inject.Provider<dagger.android.AndroidInjector.Factory<? extends androidx.fragment.app.Fragment>>> is injected at
dagger.android.DispatchingAndroidInjector.<init>(injectorFactories)
dagger.android.DispatchingAndroidInjector<androidx.fragment.app.Fragment> is injected at
com.xxx.xxx.label.ui.product.ProductActivity.fragmentDispatchingAndroidInjector
com.xxx.xxx.label.ui.product.ProductActivity is injected at
dagger.android.AndroidInjector.inject(T)
component path: com.xxx.xxx.label.di.component.AppComponent → com.xxx.xxx.label.di.builder.ActivityBuilder_BindProductActivity.ProductActivitySubcomponent
2 个错误

解决方法

最后发现是一个公共对话框的provider没有导入

今天进行操作的时候突然报了一个”非法前向引用”错误

因为是头一次见,同事也帮忙看了,最奇怪的是Application报错
但是application本身没有错
最后,发现时AppConstants中出现 非法前向引用 错误,
看来还是要多检查

今天工作的时候调整了项目的编码,发现run窗口报错后全部是乱码,而且不可恢复

解决方法:在studio64.exe.vmoptions加入-Dfile.encoding=UTF-8,搞定

早上起来发现莫名其妙的项目无法构建了

某些情况下,aidl文件内有中文注释会影响aidl的构建,造成无法生成文件

解决方法:取消所有的中文注释

减少moudle的使用,这样可以减少构建其他项目时间

减少lint检查项

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
lintOptions {
// 设置为 true,则当 Lint 发现错误时停止 Gradle 构建
abortOnError false
// 设置为 true,则当有错误时会显示文件的全路径或绝对路径 (默认情况下为true)
absolutePaths true
// 仅检查指定的问题(根据 id 指定)
check
// 设置为 true 则检查所有的问题,包括默认不检查问题
checkAllWarnings false
// 设置为 true 后,release 构建都会以 Fatal 的设置来运行 Lint。
// 如果构建时发现了致命(Fatal)的问题,会中止构建(具体由 abortOnError 控制)
checkReleaseBuilds false
// 检查指定的问题(根据 id 指定)
// enable
// 在报告中是否返回对应的 Lint 说明
explainIssues false
// 写入报告的路径,默认为构建目录下的 lint-results.html
// htmlOutput file("lint-report.html")
// 设置为 true 则会生成一个 HTML 格式的报告
// htmlReport false
// 设置为 true 则只报告错误
ignoreWarnings true
// 重新指定 Lint 规则配置文件
// lintConfig file("default-lint.xml")
// 设置为 true 则错误报告中不包括源代码的行号
noLines true
// 设置为 true 时 Lint 将不报告分析的进度
quiet true
// 覆盖 Lint 规则的严重程度,例如:
// severityOverrides["MissingTranslation": LintOptions.SEVERITY_WARNING]
// 设置为 true 则显示一个问题所在的所有地方,而不会截短列表
showAll true
// 配置写入输出结果的位置,格式可以是文件或 stdout
// textOutput 'stdout'
// 设置为 true,则生成纯文本报告(默认为 false)
// textReport false
// 设置为 true,则会把所有警告视为错误处理
warningsAsErrors false
// 写入检查报告的文件(不指定默认为 lint-results.xml)
// xmlOutput file("lint-report.xml")
// 设置为 true 则会生成一个 XML 报告
// xmlReport false
// 将指定问题(根据 id 指定)的严重级别(severity)设置为 Fatal
fatal 'NewApi', 'InlineApi'
// 将指定问题(根据 id 指定)的严重级别(severity)设置为 Error
error 'Wakelock', 'TextViewEdits'
// 将指定问题(根据 id 指定)的严重级别(severity)设置为 Warning
warning 'ResourceAsColor'
// 将指定问题(根据 id 指定)的严重级别(severity)设置为 ignore
ignore 'All'
// true--忽略有错误的文件的全/绝对路径(默认是true)
absolutePaths false
// 关闭指定问题检查
disable 'All'
}

增加内存,开启预编译类库

1
2
3
4
5
6
7
dexOptions {
preDexLibraries true
maxProcessCount 8
// Instead of setting the heap size for the DEX process, increase Gradle's
// heap size to enable dex-in-process. To learm more, read the next section.
javaMaxHeapSize "4g"
}

安装

npm install -g @ionic/cli

卸装

npm uninstall -g ionic

新建项目

ionic start projectName <mode>tabs

运行项目

ionic serve

添加android环境

ionic capacitor add android

编译android环境

ionic cordova prepare android

运行到模拟器

ionic cordova run android -l

修改gradle配置

修改 projectName\platforms\android\cordova\lib\builders\ProjectBuilder.js中的gradle版本

0%