1. 建立一個flutter項目的命令
成都創(chuàng)新互聯(lián)成立于2013年,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項目網(wǎng)站制作、成都網(wǎng)站設(shè)計網(wǎng)站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元沭陽做網(wǎng)站,已為上家服務(wù),為沭陽各地企業(yè)和個人服務(wù),聯(lián)系電話:028-86922220
2. 在ios文件夾下,生成pods文件夾
3. Xcode環(huán)境簽名設(shè)置;
把錯誤的版本刪除再添加,可解決簽名錯誤問題;必須先刪除再添加,直接修改可能不起作用。團隊開發(fā),必須使用團隊的簽名。
4.運行創(chuàng)建的flutter項目;
選擇真機、模擬機,點擊運行按鈕,或使用命令運行:
下面兩步是贈送的:
5.新加一款插件,所涉及的命令;
ios 端所涉及的命令
6. 剛更新的插件和已有的插件有沖突怎么辦?
可以試一試以下步驟:
需要在命令行操作
但是我查出來的并沒有我的包名
6.成功了,現(xiàn)在在安裝APP,就ok了
Love is like a butterfly. It goes where it pleases and it pleases where it goes.
愛情就像一只蝴蝶,它喜歡飛到哪里,就把歡樂帶到哪里。
If I had a single flower for every time I think about you, I could walk forever in my garden.
假如每次想起你我都會得到一朵鮮花,那么我將永遠在花叢中徜徉。
Within you I lose myself, without you I find myself wanting to be lost again.
有了你,我迷失了自我。失去你,我多么希望自己再度迷失。
At the touch of love everyone becomes a poet.
每一個沐浴在愛河中的人都是詩人。
Look into my eyes - you will see what you mean to me.
看看我的眼睛,你會發(fā)現(xiàn)你對我而言意味著什么。
Distance makes the hearts grow fonder.
距離使兩顆心靠得更近。
I need him like I need the air to breathe.
我需要他,正如我需要呼吸空氣。
If equal affection cannot be, let the more loving be me.
如果沒有相等的愛,那就讓我愛多一些吧。
Love is a vine that grows into our hearts.
愛是長在我們心里的藤蔓。
If I know what love is, it is because of you.
因為你,我懂得了愛。
Love is the greatest refreshment in life.
愛情是生活最好的提神劑。
Love never dies.
愛情永不死。
The darkness is no darkness with thee.
有了你,黑暗不再是黑暗。
We cease loving ourselves if no one loves us.
如果沒有人愛我們,我們也就不會再愛自己了。
There is no remedy for love but to love more.
治療愛的創(chuàng)傷唯有加倍地去愛。
When love is not madness, it is not love.
如果愛不瘋狂就不是愛了。
A heart that loves is always young.
有愛的心永遠年輕。
Love is blind.
愛情是盲目的。
1.A bad workman always blames his tools. 拙匠總怪工具差。
2.A contented mind is a perpetual feast. 知足長樂。
3.A good beginning is half the battle. 好的開端等于成功一半。
4.A little pot is soon hot. 壺小易熱,量小易怒。
5.All lay loads on a willing horse. 好馬重負。
6.A merry heart goes all the way. 心情愉快,萬事順利 。
7.Bad excuses are worse than none. 狡辯比不辯護還糟 。
8.Character is the first and last word in the success circle.
人的品格是事業(yè)成功的先決條件。
9.Cleanliness is next to godliness. 整潔近于美德 。
10.Courtesy costs nothing. 彬彬有禮,惠而不費 。
11.Doing nothing is doing ill. 無所事事,必干壞事。
12.Early to bed, early to rise, make a man healthy, wealthy, and wise.
睡得早,起得早,聰明、富裕、身體好 。
13.Empty vessels make the most noise. 滿瓶子不響,半瓶子晃蕩 。
14.Every man hath his weak side. 人皆有弱點 。
15.Everything ought to be beautiful in a human being: face, dress, soul and idea.
人的一切都應(yīng)當是美麗的:容貌、衣著、心靈和思想。
16.Extremes are dangerous. 凡事走向極端是危險的 。
17.Good advice is harsh to the ear. 忠言逆耳 。
18.Grasp all, lose all. 欲盡得,必盡失 。
19.Great hopes make great men. 偉大的理想造就偉大的人物。
20.Handsome is he who does handsomely. 行為美者才真美。
21.Have but few friends, though many acquaintances. 結(jié)交可廣,知己宜少。
22.Hear all parties.兼聽則明,偏聽則暗 。
23.He is a wise man who speaks little. 智者寡言。
24.He is not laughed at that laughs at himself first.
有自知之明者被人尊敬。
25.He is rich enough that wants nothing.
無欲者最富有,貪欲者最貧窮。
26.He is truly happy who makes others happy.
使他人幸福的人,是真正的幸福。
27.Honesty is the best policy. 誠實乃上策。
28.Hope for the best and prepare for the worst.?? 抱最好的希望,作最壞的準備 。
29.Idleness is the root of all evil. 懶惰是萬惡之源 。
30.If we dream, everything is possible. 敢于夢想,一切都將成為可能。
31.Kind hearts are the gardens, kind thoughts are the roots, kind words are flowers and kind deeds are the fruits.
仁慈的心田是花園,崇高的思想是根莖,友善的言語是花朵,良好的行為是果實。
32.Laugh, and the world laughs with you; Weep, and you weep lone.
歡笑,整個世界伴你歡笑??奁?,只有你獨自向隅而泣 。
33.Life is measured by thought and action not by time.
衡量生命的尺度是思想和行為,而不是時間。
34.Life is not all beer and skittles. 人生并非盡是樂事 。
35.Long absent, soon forgotten. 別久情疏 。
36.Look before you leap. 三思而后行 。
37.Lookers-on see most of the game. 旁觀者清,當局者迷。
38.Manners make the man.觀其待人而知其人 。
39.Misfortune tests the sincerity of friends. 患難識知交。
40.No cross, no crown.沒有苦難,就沒有快樂 。
41.Nobody's enemy but his own. 自尋苦惱 。
42.One man's fault is another man's lesson. 前車之覆,后車之鑒 。
43.Pardon all men, but never thyself. 嚴以律已,寬以待人。
44.Reason is the guide and light of life. 理智是人生的燈塔 。
45.Sadness and gladness succeed one another. 樂極生悲,苦盡甘來 。
46.Still waters run deep.流靜水深,人靜心深 。
47.The fire is the test of gold; adversity of strong men. 烈火煉真金,逆境煉壯士 。
48.The fox may grow grey, but never good. 江山易改,本性難移 。
49.The more a man learns, the more he sees his ignorance. 知識越廣博,越感已無知 。
50.Virtue is a jewel of great price. 美德是無價之寶 。
51.Weak things united become strong. 一根筷子易折斷,十根筷子硬如鐵 。
52.We can't judge a person by what he says but by what he does.
判斷一個人,不聽言語看行動 。
53.Where there is a will there is a way. 有志者,事竟成 。
54.Will is power. 意志就是力量 。
55.Wise men are silent; fools talk. 智者沉默寡言,愚者滔滔不絕 。
56.Wise men learn by others' harm, fools by their own.
智者以他人挫折為鑒,愚者必自身碰壁方知覺。
1
夏天的飛鳥,飛到我的窗前唱歌,又飛去了。
秋天的黃葉,它們沒有什么可唱,只嘆息一聲,飛落在那里。
stray birds of summer come to my window to sing and fly away.
and yellow leaves of autumn, which have no songs, flutter and fall
there with a sign.
2
世界上的一隊小小的漂泊者呀,請留下你們的足印在我的文字里。
o troupe of little vagrants of the world, leave your footprints in my words.
3
世界對著它的愛人,把它浩翰的面具揭下了。
它變小了,小如一首歌,小如一回永恒的接吻。
the world puts off its mask of vastness to its lover.
it becomes small as one song, as one kiss of the eternal.
4
是大地的淚點,使她的微笑保持著青春不謝。
it is the tears of the earth that keep here smiles in bloom.
5
無垠的沙漠熱烈追求一葉綠草的愛,她搖搖頭笑著飛開了。
the mighty desert is burning for the love of a bladeof grass who
shakes her head and laughs and flies away.
6
如果你因失去了太陽而流淚,那么你也將失去群星了。
if you shed tears when you miss the sun, you also miss the stars.
7
跳舞著的流水呀,在你途中的泥沙,要求你的歌聲,你的流動呢。你肯挾
瘸足的泥沙而俱下么?
the sands in your way beg for your song and your movement, dancing
water. will you carry the burden of their lameness?
8
她的熱切的臉,如夜雨似的,攪擾著我的夢魂。
her wishful face haunts my dreams like the rain at night.
9
有一次,我們夢見大家都是不相識的。
我們醒了,卻知道我們原是相親相愛的。
once we dreamt that we were strangers.
we wake up to find that we were dear to each other.
10
憂思在我的心里平靜下去,正如暮色降臨在寂靜的山林中。
sorrow is hushed into peace in my heart like the evening among
the silent trees
A star has 5 ends;
A square has 4 ends;
A triangle has 3 ends;
A line has 2 ends;
A life has one end.
But I hope your happiness has no end.
1. 記住該記住的,忘記該忘記的。改變能改變的,接受不能改變的。
Remember what should be remembered, and forget what should be forgotten. Alter what is changeable, and accept what is mutable.
2.魚對水說你看不到我的眼淚,因為我在水里。水說我能感覺到你的眼淚,因為你在我心里。
“You couldn’t see my tears cause I am in the water.” Fish said to water.
“But I could feel your tears cause you are in my heart.” Answered water.
3.人生短短幾十年,不要給自己留下了什么遺憾,想笑就笑,想哭就哭,該愛的時候就去愛,無謂壓抑自己。
Your life only lasts for a few decades, so be sure that you don't leave any regrets. Laugh or cry as you like, and it‘s meaningless to oppress yourself.
4. 生命中,不斷地有人進入或離開。于是,看見的,看不見了;記住的,遺忘了。生命中,不斷地有得到和失落。于是,看不見的,看見了;遺忘的,記住了。然而,看不見的,是不是就等于不存在?記住的,是不是永遠不會消失?
There is someone that is coming or passing away in your life around the clock, so you may lose sight of those seen, and forget those remembered. There is gain and loss in your life, so you may catch sight of those unseen, and remember those forgotten. Nevertheless, doesn’t the unseen exist for sure? Will the remembered remain forever?
5. 后悔是一種耗費精神的情緒。后悔是比損失更大的損失,比錯誤更大的錯誤。所以不要后悔。
Penitence is something that enervates our spirit, causing a greater loss than the loss itself and making a bigger mistake than the mistake itself. So never regret.
簽名:
keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
【~/key.jks】生成文件的路徑和文件名
keytool -importkeystore -srckeystore C:/test/key.jks -destkeystore C:/test/key.jks -deststoretype pkcs12
遷移到行業(yè)標準格式 PKCS12
在project/android下創(chuàng)建key.properties文件
文件內(nèi)容
在Projects\android\app\build.gradle里的 android{ 上邊添加
def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties =new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android{
buildTypes{
release{
? ? signingConfig signingConfigs.release
}
}
修改成
signingConfigs{
release{
? ? keyAlias keystoreProperties['keyAlias']
? ? keyPassword keystoreProperties['keyPassword']
? ? storeFile file(keystoreProperties['storeFile'])
? ? storePassword keystoreProperties['storePassword']
}
}
buildTypes{
release{
? ? signingConfig signingConfigs.release
}
}
之后在執(zhí)行 flutter build apk打包就簽名了。
在有簽名文件的情況下獲取應(yīng)用簽名:
keytool -list -v -keystore 簽名文件路徑
MD5就是文件簽名:復制出來去掉:就可以使用了。
Xcode編譯經(jīng)常遇到各種問題,處理起來費時費力,挺打擊學習積極性的。記錄下這些問題,方便自己也幫助后來人。
編譯的時候遇到:
網(wǎng)上有很多解決方法,我是用這個方法解決的:
編譯的時候遇到:
解決辦法:
Project - User-Defined - FLUTTER_ROOT 改成本地 flutter SDK路徑
感謝 issues 上的小哥,給你個????
在項目目錄下執(zhí)行 flutter run 可以正常運行到手機,但是在Xcode build 還是有問題。
這時需要手動添加 FLUTTER_ROOT 到 User-Defined :
添加之后:
就可以正常在Xcode build 安裝到手機了。
flutter build ios 后出現(xiàn):
pod install 后出現(xiàn):
解決辦法:
這是因為terminal沒有走代理的流量,
使用 git config --global http.proxy "localhost:port" ,設(shè)置代理。
port是端口號,根據(jù)不同的vpn不一樣,我的端口是10080。
執(zhí)行 git config --global http.proxy "localhost:10080"
Xcode build 的時候出現(xiàn):
解決辦法:打開 ios/Podflie 文件:
關(guān)于 bitcode 的問題,我檢查了下用到的第三方SDK,應(yīng)該是百度地圖的問題,我引入了個第三方插件(吐槽下沒官方插件),百度地圖有支持和不支持 bitcode 的兩個SDK,我取消這個插件就沒有報這個錯了,奇怪的是,再次引入同一個插件,也可以正常打包,所以說這個問題還沒有完全解決。
大家可以試下這個處理方法:
TARGETS - Build Seettings 搜 arm ,試一下把其他刪除,只留下armv7跟armv7s或者只留下armv7
解決辦法:
我是clean Xcode之后就可以了
解決辦法:
用的是P12證書,改成手動簽名: