shadowsocksrr / shadowsocksr-android

A ShadowsocksR client for Android
7.71k stars 1.32k forks source link

该发个版了吧,实在是编译不动 #238

Open ghost opened 5 years ago

ghost commented 5 years ago

系统: manjaro 18.04

$ java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-b03)
OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)
$ echo $ANDROID_HOME
/home/me/Android/Sdk/
$ echo $ANDROID_NDK_HOME
/home/me/Android/Sdk/android-ndk-r12b
$ cat local.properties
key.alias: travis
key.store: travis.keystore
key.store.password: travis
Sdk.dir=/home/me/Android/Sdk
ndk.dir=/home/me/Android/Sdk/android-ndk-r12b
~/shadowsocksr-android -- origin/Akkariiin/develop $ sbt native-build clean android:package-release
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
[ERROR] Failed to construct terminal; falling back to unsupported
java.lang.NumberFormatException: For input string: "0x100"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:580)
        at java.lang.Integer.valueOf(Integer.java:766)
        at jline.internal.InfoCmp.parseInfoCmp(InfoCmp.java:59)
        at jline.UnixTerminal.parseInfoCmp(UnixTerminal.java:242)
        at jline.UnixTerminal.<init>(UnixTerminal.java:65)
        at jline.UnixTerminal.<init>(UnixTerminal.java:50)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at jline.TerminalFactory.getFlavor(TerminalFactory.java:211)
        at jline.TerminalFactory.create(TerminalFactory.java:102)
        at jline.TerminalFactory.get(TerminalFactory.java:186)
        at jline.TerminalFactory.get(TerminalFactory.java:192)
        at sbt.ConsoleLogger$.ansiSupported(ConsoleLogger.scala:123)
        at sbt.ConsoleLogger$.<init>(ConsoleLogger.scala:117)
        at sbt.ConsoleLogger$.<clinit>(ConsoleLogger.scala)
        at sbt.GlobalLogging$.initial(GlobalLogging.scala:43)
        at sbt.StandardMain$.initialGlobalLogging(Main.scala:116)
        at sbt.StandardMain$.initialState(Main.scala:125)
        at sbt.xMain.run(Main.scala:34)
        at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
        at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
        at xsbt.boot.Launch$.run(Launch.scala:109)
        at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
        at xsbt.boot.Launch$.launch(Launch.scala:117)
        at xsbt.boot.Launch$.apply(Launch.scala:18)
        at xsbt.boot.Boot$.runImpl(Boot.scala:56)
        at xsbt.boot.Boot$.main(Boot.scala:18)
        at xsbt.boot.Boot.main(Boot.scala)

[warn] Executing in batch mode.
[warn]   For better performance, hit [ENTER] to switch to interactive mode, or
[warn]   consider launching sbt without any commands, or explicitly passing 'shell'
[info] Loading project definition from /home/me/shadowsocksr-android/project
[info] Set current project to shadowsocksr (in build file:/home/me/shadowsocksr-android/)
[info] ~/shadowsocksr-android/src/main ~/shadowsocksr-android
[info] Android NDK: WARNING: Unsupported source file extensions in jni/Android.mk for module sodium    
[info] Android NDK:   shadowsocks-libev/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2-impl.h shadowsocks-libev/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h shadowsocks-libev/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse2.h shadowsocks-libev/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse41.h shadowsocks-libev/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-round.h shadowsocks-libev/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.h shadowsocks-libev/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h shadowsocks-libev/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h shadowsocks-libev/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h shadowsocks-libev/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h shadowsocks-libev/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.h shadowsocks-libev/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sysendian.h shadowsocks-libev/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/base.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/base2.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d2.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_add.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_madd.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_msub.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_dbl.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_sub.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow22523.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow225521.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sqrtm1.h shadowsocks-libev/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.h shadowsocks-libev/libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.h shadowsocks-libev/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/curve25519_ref10.h shadowsocks-libev/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe.h shadowsocks-libev/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/montgomery.h shadowsocks-libev/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/pow225521.h    
[info] Android NDK: WARNING: Unsupported source file extensions in jni/Android.mk for module sodium    
[info] Android NDK:   shadowsocks-libev/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2-impl.h shadowsocks-libev/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h shadowsocks-libev/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse2.h shadowsocks-libev/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse41.h shadowsocks-libev/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-round.h shadowsocks-libev/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.h shadowsocks-libev/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h shadowsocks-libev/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h shadowsocks-libev/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h shadowsocks-libev/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h shadowsocks-libev/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.h shadowsocks-libev/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sysendian.h shadowsocks-libev/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/base.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/base2.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d2.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_add.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_madd.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_msub.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_dbl.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_sub.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow22523.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow225521.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc.h shadowsocks-libev/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sqrtm1.h shadowsocks-libev/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.h shadowsocks-libev/libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.h shadowsocks-libev/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/curve25519_ref10.h shadowsocks-libev/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe.h shadowsocks-libev/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/montgomery.h shadowsocks-libev/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/pow225521.h    
[info] [armeabi-v7a] Install        : pdnsd => libs/armeabi-v7a/pdnsd
[info] [armeabi-v7a] Install        : libproxychains4.so => libs/armeabi-v7a/libproxychains4.so
[info] [armeabi-v7a] Install        : redsocks => libs/armeabi-v7a/redsocks
[info] [armeabi-v7a] Install        : ss-local => libs/armeabi-v7a/ss-local
[info] [armeabi-v7a] Install        : libsystem.so => libs/armeabi-v7a/libsystem.so
[info] [armeabi-v7a] Install        : tun2socks => libs/armeabi-v7a/tun2socks
[info] [x86] Install        : pdnsd => libs/x86/pdnsd
[info] [x86] Install        : libproxychains4.so => libs/x86/libproxychains4.so
[info] [x86] Install        : ss-local => libs/x86/ss-local
[info] [x86] Install        : redsocks => libs/x86/redsocks
[info] [x86] Install        : libsystem.so => libs/x86/libsystem.so
[info] [x86] Install        : tun2socks => libs/x86/tun2socks
[info] ~/shadowsocksr-android
[success] Total time: 0 s, completed 2019-6-23 21:21:15
[success] Total time: 0 s, completed 2019-6-23 21:21:15
[info] Updating {file:/home/me/shadowsocksr-android/}shadowsocksr-android...
[info] Resolving org.scala-lang#scala-library;2.11.8 ...
[info] Resolving com.android.support#cardview-v7;25.1.0 ...
[info] Resolving com.android.support#support-annotations;25.1.0 ...
[info] Resolving com.android.support#design;25.1.0 ...
[info] Resolving com.android.support#support-v4;25.1.0 ...
[info] Resolving com.android.support#support-compat;25.1.0 ...
[info] Resolving com.android.support#support-media-compat;25.1.0 ...
[info] Resolving com.android.support#support-core-utils;25.1.0 ...
[info] Resolving com.android.support#support-core-ui;25.1.0 ...
[info] Resolving com.android.support#support-fragment;25.1.0 ...
[info] Resolving com.android.support#appcompat-v7;25.1.0 ...
[info] Resolving com.android.support#support-vector-drawable;25.1.0 ...
[info] Resolving com.android.support#animated-vector-drawable;25.1.0 ...
[info] Resolving com.android.support#recyclerview-v7;25.1.0 ...
[info] Resolving com.android.support#transition;25.1.0 ...
[info] Resolving com.android.support#gridlayout-v7;25.1.0 ...
[info] Resolving com.android.support#preference-v14;25.1.0 ...
[info] Resolving com.android.support#preference-v7;25.1.0 ...
[info] Resolving com.evernote#android-job;1.1.3 ...
[info] Resolving net.vrallev.android#cat;1.0.5 ...
[info] Resolving com.github.clans#fab;1.6.4 ...
[info] Resolving com.github.jorgecastilloprz#fabprogresscircle;1.01 ...
[info] Resolving com.google.android.gms#play-services-analytics;10.0.1 ...
[info] Resolving com.google.android.gms#play-services-analytics-impl;10.0.1 ...
[info] Resolving com.google.android.gms#play-services-base;10.0.1 ...
[info] Resolving com.google.android.gms#play-services-basement;10.0.1 ...
[info] Resolving com.google.android.gms#play-services-tasks;10.0.1 ...
[info] Resolving com.google.android.gms#play-services-tagmanager-v4-impl;10.0.1 ...
[info] Resolving com.google.android.gms#play-services-gcm;10.0.1 ...
[info] Resolving com.google.android.gms#play-services-iid;10.0.1 ...
[info] Resolving com.j256.ormlite#ormlite-android;5.0 ...
[info] Resolving com.j256.ormlite#ormlite-core;5.0 ...
[info] Resolving com.mikepenz#fastadapter;2.1.5 ...
[info] Resolving com.mikepenz#iconics-core;2.8.2 ...
[info] Resolving com.mikepenz#materialdrawer;5.8.1 ...
[info] Resolving com.mikepenz#materialize;1.0.0 ...
[info] Resolving com.twofortyfouram#android-plugin-api-for-locale;1.0.2 ...
[info] Resolving net.jcip#jcip-annotations;1.0 ...
[info] Resolving dnsjava#dnsjava;2.1.7 ...
[info] Resolving eu.chainfire#libsuperuser;1.0.0.+ ...
[info] Resolving eu.chainfire#libsuperuser;1.0.0.+ ...
[warn] UPDATE: A newer sbt-android is available: 1.7.10, currently running: 1.7.7
[info] Resolving me.dm7.barcodescanner#zxing;1.9.8 ...
[info] Resolving me.dm7.barcodescanner#core;1.9.8 ...
[info] Resolving com.android.support#support-v4;25.3.1 ...
[info] Resolving com.android.support#support-compat;25.3.1 ...
[info] Resolving com.android.support#support-annotations;25.3.1 ...
[info] Resolving com.android.support#support-media-compat;25.3.1 ...
[info] Resolving com.android.support#support-core-utils;25.3.1 ...
[info] Resolving com.android.support#support-core-ui;25.3.1 ...
[info] Resolving com.android.support#support-fragment;25.3.1 ...
[info] Resolving com.google.zxing#core;3.3.0 ...
[info] Resolving net.glxn.qrgen#android;2.0 ...
[info] Resolving net.glxn.qrgen#core;2.0 ...
[info] Resolving com.squareup.okhttp3#okhttp;3.8.0 ...
[info] Resolving com.squareup.okio#okio;1.13.0 ...
[info] Resolving com.google.code.findbugs#jsr305;1.3.+ ...
[info] Resolving com.google.code.findbugs#jsr305;1.3.+ ...
[info] Resolving net.sf.proguard#proguard-base;5.3.2 ...
[info] Resolving org.scala-lang#scala-compiler;2.11.8 ...
[info] Resolving org.scala-lang#scala-reflect;2.11.8 ...
[info] Resolving org.scala-lang.modules#scala-xml_2.11;1.0.4 ...
[info] Resolving org.scala-lang.modules#scala-parser-combinators_2.11;1.0.4 ...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] Collecting resources
[info] Performing full resource merge
[warn] /home/me/shadowsocksr-android/src/main/AndroidManifest.xml:21:5-22:45 Warning:
[warn]  Element uses-feature#android.hardware.camera at AndroidManifest.xml:21:5-22:45 duplicated with element declared at AndroidManifest.xml:15:5-16:45
[info] QueuedCruncher is using /home/me/Android/Sdk/build-tools/29.0.0/aapt
[info] Processing resources
[info] QueuedCruncher is using /home/me/Android/Sdk/build-tools/29.0.0/aapt
[warn] warning: string 'kcp_port' has no default translation.
[warn] warning: string 'kcp_port_summary' has no default translation.
[warn] warning: string 'kcp_summary' has no default translation.
[warn] warning: string 'kcpcli' has no default translation.
[warn] warning: string 'remote_dns' has no default translation.
[warn] warning: string 'remote_dns_summary' has no default translation.
[info] Rebuilding all classes because R.java has changed
[info] Compiling 46 Scala sources and 22 Java sources to /home/me/shadowsocksr-android/target/scala-2.11/classes...
[error] /home/me/shadowsocksr-android/src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala:62: value setOnClickListener is not a member of Nothing
[error]       shareBtn.setOnClickListener(_ => {
[error]                ^
[error] /home/me/shadowsocksr-android/src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala:95: value setOnLongClickListener is not a member of Nothing
[error]       shareBtn.setOnLongClickListener(_ => {
[error]                ^
[error] /home/me/shadowsocksr-android/src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala:104: value setOnClickListener is not a member of Nothing
[error]       pingBtn.setOnClickListener(_ => {
[error]               ^
[error] /home/me/shadowsocksr-android/src/main/scala/com/github/shadowsocks/ProfileManagerActivity.scala:254: value setOnLongClickListener is not a member of Nothing
[error]       pingBtn.setOnLongClickListener(_ => {
[error]               ^
[error] four errors found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 24 s, completed 2019-6-23 21:21:39
zhangzhichaolove commented 5 years ago

我倒是编译成功了,可是运行会报错。。。 [info] dex method count: 32459 [info] Packaged: shadowsocksr-release-unsigned.apk (2.88MB) jar 已签名。

警告: 签名者证书为自签名证书。 为 -sigalg 选项指定的 MD5withRSA 算法被视为存在安全风险。 [info] Signed: shadowsocksr-release-unaligned.apk [info] zipaligned: shadowsocksr-release.apk [success] Total time: 36 s, completed 2019-6-28 15:23:17