在Redex頁面http://fbredex.com/有非常不錯的說明。如何設置Facebook Redex以優化Android字節碼?
我按照說明,但我有兩個步驟的問題。所以,任何想法/幫助將不勝感激。
1.I具有第一命令的運行(我的OS是Ubuntu的)沒有問題
sudo apt-get install \
g++ \
automake \
autoconf \
autoconf-archive \
libtool \
libboost-all-dev \
libevent-dev \
libdouble-conversion-dev \
libgoogle-glog-dev \
libgflags-dev \
liblz4-dev \
liblzma-dev \
libsnappy-dev \
make \
zlib1g-dev \
binutils-dev \
libjemalloc-dev \
libssl-dev \
libiberty-dev
我克隆在我的筆記本folly回購某處
我去目錄由
$ cd android/projects/folly/folly/
我跑
git submodule update --init
但沒有任何反應。我甚至在$ cd android/projects/folly/
中運行這個命令,但是也沒有任何反應。我跑
autoreconf -ivf && ./configure && make && make install
。似乎有效,因爲我看到過程需要大約一兩分鐘的時間,並且有很多消息打印出來。我將示例.apk文件複製/粘貼到我的桌面並運行
redex ~/Desktop/my_android_app.apk -o ~/Desktop/my_android_app-redexed.apk
。但是,我在終端上收到此消息。
無命令 '歸約' 發現,你的意思是:從包命令 'redet' 'redet'(宇宙)歸約:找不到命令
我上面的命令跑,當我我在/home/hesam/android/projects/folly/folly
或/home/hesam/android/projects/folly/
。但是我得到相同的輸出。
更新
我克隆Redex回購和隨後Bert的指令。它可以工作,我可以通過運行git submodule update --init
來看到發生了什麼。非常感謝Bert。但是,我在autoreconf -ivf && ./configure && make && make install
命令結束時出錯。請看看下面的輸出,讓我知道你是否有任何想法。謝謝。
Making all in unit
make[3]: Entering directory `/home/hesam/android/projects/redex/test/unit'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/hesam/android/projects/redex/test/unit'
make[2]: Leaving directory `/home/hesam/android/projects/redex/test'
make[1]: Leaving directory `/home/hesam/android/projects/redex'
Making install in third-party/folly/folly
make[1]: Entering directory `/home/hesam/android/projects/redex/third-party/folly/folly'
Making install in .
make[2]: Entering directory `/home/hesam/android/projects/redex/third-party/folly/folly'
make[3]: Entering directory `/home/hesam/android/projects/redex/third-party/folly/folly'
/bin/mkdir -p '/usr/local/lib'
/bin/bash ./libtool --mode=install /usr/bin/install -c libfolly.la libfollybenchmark.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libfolly.so.57.0.0 /usr/local/lib/libfolly.so.57.0.0
/usr/bin/install: cannot create regular file '/usr/local/lib/libfolly.so.57.0.0': Permission denied
make[3]: *** [install-libLTLIBRARIES] Error 1
make[3]: Leaving directory `/home/hesam/android/projects/redex/third-party/folly/folly'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/home/hesam/android/projects/redex/third-party/folly/folly'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/hesam/android/projects/redex/third-party/folly/folly'
make: *** [install-recursive] Error 1
hesam: redex (master) $ redex ~/Desktop/my_android_app.apk -o ~/Desktop/my_android_app-redexed.apk
No command 'redex' found, did you mean:
Command 'redet' from package 'redet' (universe)
redex: command not found
hesam: redex (master) $
閱讀關於Github上的問題。人們有你的問題,並有答案如何解決它 – WizKid