donmor / Tiddloid

Tiddloid is an app to work with locally stored TiddlyWikis.
GNU General Public License v2.0
234 stars 10 forks source link

How to dev #27

Closed linonetwo closed 1 year ago

linonetwo commented 2 years ago

I have trouble syncing gradle.

截屏2022-02-21 下午10 33 54
linonetwo commented 2 years ago

It is not fully supported to define distributionSha256Sum in gradle/wrapper/gradle-wrapper.properties.
Using an incorrect value may freeze or crash Android Studio.
Please manually verify or remove this property from all of included projects if applicable.
For more details, see gradle/gradle#9361.
Use "3239b5ed8..." as checksum for https://services.gradle.org/distributions/gradle-6.7.1-bin.zip and sync project
Remove distributionSha256Sum and sync project
Open Gradle wrapper properties

linonetwo commented 2 years ago

点了 Use "3239b5ed8..." as checksum for https://services.gradle.org/distributions/gradle-6.7.1-bin.zip and sync project 之后

出现 

storeFile file(properties.getProperty('keyFile'))

^org.gradle.api.GradleScriptException: A problem occurred evaluating project ':app'.

Caused by: java.lang.IllegalArgumentException: path may not be null or empty string. path='null'

/gradle-6.7.1-bin.zip https://docs.gradle.org/current/userguide/compatibility.html seems I should use Java 15

donmor commented 2 years ago

那个是我的签名密钥,在我机器上的local.properties里(`・ω・´)ゞ直接build.gradle里把相关部分整个注释掉就行了

linonetwo commented 2 years ago

怎么知道要用 Java 几啊,是看 gradle 版本,对应 Java 15 吗

donmor commented 2 years ago

安卓好像现在才8。。反正我在ubuntu20.04上apt装的11能用

linonetwo commented 2 years ago

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:validateSigningDebug'.

Caused by: org.gradle.api.InvalidUserDataException: Keystore file not set for signing config donmor

看来得自己生成一个debug用的了对吧,也不能直接注释掉

donmor commented 2 years ago

4的

linonetwo commented 2 years ago

记录一下方法:

运行:keytool -genkey -v -keystore ~/Desktop/aaa.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias keyB
密码输入为 123456。生成产物从桌面拖到 app 文件夹里

修改build.gradle文件里的这部分为:

android {
    signingConfigs {
        donmor {
            storeFile file('aaa.jks')
            storePassword '123456'
            keyAlias = 'keyB'
            keyPassword '123456'
        }
    }

注意别把这个本地测试用的aaa.jks文件提交到git里就好

donmor commented 2 years ago

4的~也可以像我一样放在local.properties里

donmor commented 2 years ago

有空到时加点注释ƪ(˘⌣˘)ʃ

linonetwo commented 2 years ago

开始看代码了,虽然总共就 5 个文件,但是文件都巨长,得看一阵子了…

很多内容好像是工厂方法动态生成的, layout 里各个文件暂时看不出用途

我Android只学到 ListAdaptor(之前的习作 https://github.com/linonetwo/tiddlywiki-quickadd-android ) ,所以目前只看得懂 WikiListAdaptor 哈哈。

linonetwo commented 2 years ago

啥时候有空呀,就等着你有空加注释呢

donmor commented 2 years ago

慢慢来吧😂最近有丶忙

linonetwo commented 1 year ago

你的 local.properties 长啥样,我想看看 keytool -genkey -v -keystore ~/Desktop/aaa.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias keyB 之后放哪里好

今天试了一下又遇到问题,一搜发现原来之前已经遇到过了,而且之前放弃了,哈哈

donmor commented 1 year ago

回头吧,这段时间单位忙

发自我的小米 在 lin onetwo @.***>,2023年2月21日 13:48写道:

你的 local.properties 长啥样,我想看看 keytool -genkey -v -keystore ~/Desktop/aaa.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias keyB 之后放哪里好

— Reply to this email directly, view it on GitHubhttps://github.com/donmor/Tiddloid/issues/27#issuecomment-1437894374, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHC3RYBOANAWDZ56NMC35V3WYRJLZANCNFSM5O6YUEQQ. You are receiving this because you commented.Message ID: @.***>

linonetwo commented 1 year ago

你最近都不开自己的电脑了啊,咋这么忙

linonetwo commented 1 year ago
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Tue Feb 21 13:30:56 CST 2023
sdk.dir=/Users/linonetwo/Library/Android/sdk
keyFile=../devkey.jks
signPassword=123456
keyAlias=keyB
linonetwo commented 1 year ago

我之后提交一个 local.properties.template 上去,并在注释里带上密钥生成的方法