shadowsocks / shadowsocks-android

A shadowsocks client for Android
Other
35.12k stars 11.58k forks source link

Help:: Build problem #854

Closed zhouzhou3516 closed 8 years ago

zhouzhou3516 commented 8 years ago

Got errors: Call requires API level 21 (current min is 19):

I am using openjdk version 1.8 $ java -version openjdk version "1.8.0_91" OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14) OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

what need to be upgraded? ====error log=================================================== [info] Compiling 40 Scala sources and 14 Java sources to /home/xxxx/mypro/shadowsocks-android/target/android/intermediates/classes... [warn] there was one deprecation warning; re-run with -deprecation for details [warn] there was one feature warning; re-run with -feature for details [warn] two warnings found [error] [NewApi] target/android/intermediates/classes/com/github/shadowsocks/ShadowsocksVpnService$$anonfun$startVpn$2.class:Call requires API level 21 (current min is 19):android.net.VpnService.Builder#addAllowedApplication [error] [NewApi] target/android/intermediates/classes/com/github/shadowsocks/ShadowsocksVpnService$$anonfun$startVpn$2.class:Call requires API level 21 (current min is 19): android.net.VpnService.Builder#addDisallowedApplication [error] [NewApi] src/main/res/drawable/ic_arrow_drop_down.xml:1: requires API level 21 (current min is 19) or building with Android Gradle plugin 1.4 or higher [error] <vector xmlns:android="http://schemas.android.com/apk/res/android" [error] ^ [error] .... [error] lint found 15 errors, 6 warnings [info] Packaging resources: resources-release.ap_ [info] Packaging /home/xxxxxx/mypro/shadowsocks-android/target/android/intermediates/classes.jar ... [info] Done packaging. [error] Unable to locate SDK proguard config: /home/xxxxxx/mypro/android/android-sdk/tools/proguard/proguard-android.txt error Unable to locate SDK proguard config: /home/xxxxxx/mypro/android/android-sdk/tools/proguard/proguard-android.txt [error] Total time: 91 s, completed 2016-9-4 2:03:43

madeye commented 8 years ago

Double check your SDK.

zhouzhou3516 commented 8 years ago

@madeye build successfully passed by modify src/main/AndroidManifest.xml minSdkVersion change android:minSdkVersion="21" to android:minSdkVersion="19" I am currently using android 7.0( API 24). Altough the build got workaround, still not sure what is the root cause. what should be the standard fix, do you have any comments?