facebook / infer

A static analyzer for Java, C, C++, and Objective-C
http://fbinfer.com/
MIT License
14.97k stars 2.02k forks source link

[Android] Infer scan failed ButterKnife + AndroidStudio 3.0 #807

Closed xiaoooyu closed 5 years ago

xiaoooyu commented 6 years ago

Hi guys, Infer scan failed on my small project after adding dependency on ButterKnife Lib based on Android Studio 3.0 upgrade.

Infer version: v0.13.0-c542b65a Infer command: infer -- ./gradlew assembleDebug Infer log has been attached below. logs.txt

OS environment: MacOSX 10.12.6 Android Tool: com.android.tools.build:gradle:3.0.0

My git repository is https://github.com/xiaoooyu/Run4ThirteenWeeks.git. There are two branches in it:

I have tried the way suggested in #22 , and the error is still there.

Any advice?

jeremydubreil commented 6 years ago

What does the error look like? Is it a compilation failure or a failure of the analysis?

xiaoooyu commented 6 years ago

@jeremydubreil It's a analysis failure. Pls refer to the log below:

[4994][environment] CWD = /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks [4994][environment] No .inferconfig file found [4994][environment] Project root = /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks [4994][environment] INFER_ARGS = @/var/folders/bj/phksmgs537146gzdzlcl71gc0000gn/T/args_2b2ae6 [4994][environment] Contents of '/var/folders/bj/phksmgs537146gzdzlcl71gc0000gn/T/args_2b2ae6' [4994][environment] --keep-going [4994][environment] /Contents of '/var/folders/bj/phksmgs537146gzdzlcl71gc0000gn/T/args_2b2ae6' [4994][environment] command line arguments: infer^--keep-going^--^./gradlew^assembleDebug [4994][environment] Analyzer: checkers [4994][environment] Active checkers: annotation reachability (Java), biabduction (C/C++/ObjC, Java), fragment retains view (Java), immutable cast (Java), liveness (C/C++/ObjC), printf args (Java), quandary (C/C++/ObjC, Java), RacerD (C/C++/ObjC, Java), SIOF (C/C++/ObjC) [4994][environment] Infer version v0.13.0-c542b65a [4994][environment] Copyright 2009 - present Facebook. All Rights Reserved. [4994][environment] [4994][ progress] Capturing in gradle mode...

[5030][environment] CWD = /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks [5030][environment] No .inferconfig file found [5030][environment] Project root = /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks [5030][environment] INFER_ARGS = @/var/folders/bj/phksmgs537146gzdzlcl71gc0000gn/T/args_b55a66 [5030][environment] Contents of '/var/folders/bj/phksmgs537146gzdzlcl71gc0000gn/T/args_b55a66' [5030][environment] @/var/folders/bj/phksmgs537146gzdzlcl71gc0000gn/T/args_2b2ae6 [5030][environment] capture [5030][environment] --continue [5030][environment] /Contents of '/var/folders/bj/phksmgs537146gzdzlcl71gc0000gn/T/args_b55a66' [5030][environment] command line arguments: /Users/xiaoooyu/workspace/github/infer/infer/lib/python/inferlib/../../../bin/infer^capture^--continue^--^javac^-source^1.7^-target^1.7^-d^/Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/intermediates/classes/debug^-encoding^UTF-8^-bootclasspath^/Users/xiaoooyu/Library/Android/sdk/platforms/android-24/android.jar^-g^-sourcepath^-processorpath^/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-compiler/8.8.1/b2f4505a1babb7b7c11abbbf8ea4c90b18c3aeac/butterknife-compiler-8.8.1.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-annotations/8.8.1/bc373fb6bc7bca3035041b924f158fd2b946ee8d/butterknife-annotations-8.8.1.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.google.auto/auto-common/0.8/c6f7af0e57b9d69d81b05434ef9f3c5610d498c4/auto-common-0.8.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.squareup/javapoet/1.9.0/ecc5cf9c221d55481163e773b24336db149e51/javapoet-1.9.0.jar:/Users/xiaoooyu/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/25.3.0/support-annotations-25.3.0.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/19.0/6ce200f6b23222af3d8abb6b6459e6c44f4bb0e9/guava-19.0.jar^-XDuseUnsharedTable=true^-classpath^/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-9.4.0.aar/94449de08789ec16b842095834ff6aff/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/design-24.2.1.aar/5d7148d3fb8bcf7b6a371f0473f9d7ab/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-cast-framework-9.4.0.aar/8ea61d18b3d0ca74200569045072a2f2/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-cast-9.4.0.aar/899689b26a7d7e970b9566bf3b68de24/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/mediarouter-v7-23.0.0.aar/8d1a468fb35abda470a1a41b82746e9b/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/mediarouter-v7-23.0.0.aar/8d1a468fb35abda470a1a41b82746e9b/jars/libs/internal_impl-23.0.0.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/appcompat-v7-24.2.1.aar/7b2c0b7bbcecfcd0140ca2b009d5b030/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/multidex-1.0.0.aar/ea334ba534b45066c21238b91c5ddb2b/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/butterknife-8.8.1.aar/c0c503fb429c80745255e6bb2ac9a0cc/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-ads-9.4.0.aar/6ca9ba7942944b6b1b887461d1067dd2/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-ads-lite-9.4.0.aar/4cc93bf3636e32a3ae2d0414d2ec166c/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-analytics-9.4.0.aar/8c09ed0855518093f90104fe87268408/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-tagmanager-9.4.0.aar/de0a01b84eeb321784e8aadd6df4eeeb/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-analytics-impl-9.4.0.aar/2a75e6a88c1fd7d3b4fa2542441cb56c/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-appinvite-9.4.0.aar/20077479a4585f67890d43cafca2e7d6/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-auth-9.4.0.aar/b3d79177ac2f1d2e5d659573d9407558/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-auth-base-9.4.0.aar/cd8dc3f32dadc7638665e983ce42a5c2/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-clearcut-9.4.0.aar/48123f830715703e788d93dc914b65e7/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-config-9.4.0.aar/8e931a251ebd44e2b60d69f872e221a2/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-contextmanager-9.4.0.aar/413b5e33fbe2ef3027d2321c45518487/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-crash-9.4.0.aar/d2c790acf7e9bcd4d390bbd594a2ea83/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-games-9.4.0.aar/3f2186bc8fa005f19ab3c6f855616ed0/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-drive-9.4.0.aar/aae0534e675ba3ef52a285f322dd21a5/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-auth-9.4.0.aar/c9ffd18d02551dab2a5b0c86be7f966d/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-auth-common-9.4.0.aar/131d6f37b03313aaba2b071495b83ecb/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-auth-module-9.4.0.aar/d49c51013b64af6632d6cf2410c26a9b/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-database-9.4.0.aar/d348e7453cbb48b7c4a55bce61e18549/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-database-connection-9.4.0.aar/f68bc5f6d7f58c9823e9e6819d4ce6f7/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-storage-9.4.0.aar/de87712bab6de96029f508c8eb12dcef/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-storage-common-9.4.0.aar/9364a98382508071d2d0bdfcb9a5da7e/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-fitness-9.4.0.aar/5b3c73e803917fedfffa073823cf6c63/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-gcm-9.4.0.aar/8a25e32b18d36441bfe9f54298046d42/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-appindexing-9.4.0.aar/87c2ee700c7e3637a820c1e06831527a/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-wallet-9.4.0.aar/77e668fdf213747b67d1f436e809a7bf/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-identity-9.4.0.aar/9294283941295da07269bab188b8be9a/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-iid-9.4.0.aar/fd95038d7f0a20a0891addb9ecf403c7/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-location-9.4.0.aar/dd096736d6cc99f7f91aeb85eeb11ad0/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-places-9.4.0.aar/a654a0d60bc54ca16ebcb2c1a91e5961/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-maps-9.4.0.aar/49d373c338ade9f863955eead23a1ee9/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-nearby-9.4.0.aar/1c9c17e9fca5497c15218467ebeec060/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-panorama-9.4.0.aar/e96c3ef89144c3722482cf542fd6ec57/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-plus-9.4.0.aar/ecd455a57ef04214312becb0aac2f162/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-safetynet-9.4.0.aar/351a77e56dad889dfaa1b40993ffd1f1/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-vision-9.4.0.aar/d09a9242a00679870a12ebfc2b2e16ff/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-wearable-9.4.0.aar/4815a050eb48e20dea3ed750934044df/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-base-9.4.0.aar/842af08da7e8ab6a81a0a50e5740adae/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-messaging-9.4.0.aar/4712e84d17fcefd05fc1b46122663699/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-tagmanager-api-9.4.0.aar/25e1cb43d64e824c2259f3cc19654ff5/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-analytics-9.4.0.aar/3a92f674a727c566947e403c4c450eff/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-analytics-impl-9.4.0.aar/7ade77aa27ef7fc2dfacc178832e8dba/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-iid-9.4.0.aar/3b9d2af6330b2c6708362df0426ee927/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-common-9.4.0.aar/2efeaccc36b62d52c0254b373221db64/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-gass-9.4.0.aar/0ad5030c3056c41a0d753309cc6aefbf/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-tasks-9.4.0.aar/adb48ed258def2a6151488e40865b3fe/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-basement-9.4.0.aar/d8a05c3d98858c814245b7c2b5bd1eba/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-v4-24.2.1.aar/d1732d25baf8173861ea3c64dab7f3a7/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/animated-vector-drawable-24.2.1.aar/7dc5728c758553363b8e66ee7f0b7345/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-vector-drawable-24.2.1.aar/13f5fe9ad19809a3d42b3af3e385bc7f/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/recyclerview-v7-24.2.1.aar/1939484b863163a414f9eb4bf62d43cd/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-annotations/8.8.1/bc373fb6bc7bca3035041b924f158fd2b946ee8d/butterknife-annotations-8.8.1.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-fragment-24.2.1.aar/6a9226bdf4c20c9927215091c4b2c38e/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-fragment-24.2.1.aar/6a9226bdf4c20c9927215091c4b2c38e/jars/libs/internal_impl-24.2.1.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-core-ui-24.2.1.aar/fbd16455675724f62352ef0396229766/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-core-ui-24.2.1.aar/fbd16455675724f62352ef0396229766/jars/libs/internal_impl-24.2.1.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-media-compat-24.2.1.aar/51c0ade069ab246d74a270ad135e958a/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-media-compat-24.2.1.aar/51c0ade069ab246d74a270ad135e958a/jars/libs/internal_impl-24.2.1.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-core-utils-24.2.1.aar/a4194a0907e27671ccaaed202c1bd184/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-core-utils-24.2.1.aar/a4194a0907e27671ccaaed202c1bd184/jars/libs/internal_impl-24.2.1.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-compat-25.3.0.aar/3647a2bf54aec8d179e53b4fe9320ce2/jars/classes.jar:/Users/xiaoooyu/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/25.3.0/support-annotations-25.3.0.jar^-s^/Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/apt/debug^@/Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/infer-out/filelists/gradle_6M3o.txt [5030][environment] Contents of '/Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/infer-out/filelists/gradle_6M3o.txt' [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/buildConfig/debug/com/xiaoyu/run4thirteenweeks/BuildConfig.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/xiaoyu/run4thirteenweeks/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/xiaoyu/run4thirteenweeks/Manifest.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/firebase/storage/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/firebase/remoteconfig/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/firebase/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/firebase/messaging/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/firebase/iid/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/firebase/database/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/firebase/database/connection/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/firebase/crash/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/firebase/auth/module/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/firebase/auth/common/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/firebase/auth/api/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/wearable/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/wallet/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/vision/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/tasks/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/tagmanager/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/tagmanager/impl/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/safetynet/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/plus/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/play_services/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/panorama/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/nearby/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/measurement/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/measurement/impl/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/maps/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/location/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/iid/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/identity/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/gcm/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/games/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/fitness/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/drive/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/contextmanager/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/clearcut/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/cast/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/cast/framework/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/base/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/auth/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/auth/api/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/appinvite/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/appindexing/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/analytics/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/ads/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/com/google/android/gms/ads/impl/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/butterknife/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/android/support/v7/recyclerview/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/android/support/v7/mediarouter/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/android/support/v7/appcompat/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/android/support/v4/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/android/support/multidex/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/android/support/mediacompat/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/android/support/graphics/drawable/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/android/support/graphics/drawable/animated/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/android/support/fragment/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/android/support/design/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/android/support/coreutils/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/android/support/coreui/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/r/debug/android/support/compat/R.java [5030][environment] /Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/src/main/java/com/xiaoyu/run4thirteenweeks/MainActivity.java [5030][environment] /Contents of '/Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/infer-out/filelists/gradle_6M3o.txt' [5030][environment] Analyzer: capture [5030][environment] Active checkers: annotation reachability (Java), biabduction (C/C++/ObjC, Java), fragment retains view (Java), immutable cast (Java), liveness (C/C++/ObjC), printf args (Java), quandary (C/C++/ObjC, Java), RacerD (C/C++/ObjC, Java), SIOF (C/C++/ObjC) [5030][ debug] Current working directory: '/Users/xiaoooyu/workspace/me/Run4ThirteenWeeks' [5030][ debug] Trying to execute: javac '-J-Duser.language=en' '@/Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/infer-out/filelists/gradle_6M3o.txt' '@/var/folders/bj/phksmgs537146gzdzlcl71gc0000gn/T/args_774763' 2>'/var/folders/bj/phksmgs537146gzdzlcl71gc0000gn/T/javac_652376.out' [5030][ debug] Failed: exited with code 2! [5030][ debug] [5030][ debug] Trying to execute: javac '@/Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/infer-out/filelists/gradle_6M3__o.txt' '@/var/folders/bj/phksmgs537146gzdzlcl71gc0000gn/T/args_774763' 2>'/var/folders/bj/phksmgs537146gzdzlcl71gc0000gn/T/javac_652376.out' [5030][ user err] Failed to execute compilation command: exited with code 2 Command: javac '@/Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/infer-out/filelists/gradle_6M3__o.txt' '@/var/folders/bj/phksmgs537146gzdzlcl71gc0000gn/T/args_774763' Output: javac: invalid flag: /Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-compiler/8.8.1/b2f4505a1babb7b7c11abbbf8ea4c90b18c3aeac/butterknife-compiler-8.8.1.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-annotations/8.8.1/bc373fb6bc7bca3035041b924f158fd2b946ee8d/butterknife-annotations-8.8.1.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.google.auto/auto-common/0.8/c6f7af0e57b9d69d81b05434ef9f3c5610d498c4/auto-common-0.8.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.squareup/javapoet/1.9.0/ecc5cf9c221d55481163e773b24336db149e51/javapoet-1.9.0.jar:/Users/xiaoooyu/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/25.3.0/support-annotations-25.3.0.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/19.0/6ce200f6b23222af3d8abb6b6459e6c44f4bb0e9/guava-19.0.jar Usage: javac use -help for a list of possible options

*** Infer needs a working compilation command to run.

jeremydubreil commented 6 years ago

This seems to be a compilation failure. The failing command is:

*** Failed to execute compilation command: exited with code 2
*** Command: javac '@/Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/infer-out/filelists/gradle_6M3__o.txt' '@/var/folders/bj/phksmgs537146gzdzlcl71gc0000gn/T/args_774763'

which seems to be failing with:

javac: invalid flag: /Users/xiaoooyu/.gradle/caches/modules-2/files- ...

I suspect that the command line use run with some malformed option. Can you see what the command line would look like when expanding the arg files, i.e. the files starting with @ which are containing the list of command line options.

xiaoooyu commented 6 years ago

Let me check the command line. However it is success when run

./gradlew assembleDebug

Or can you clone my repository and give it a try?

xiaoooyu commented 6 years ago

@jeremydubreil the content in the arg files is shown below:

'-verbose' '-g' '-d' '/Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/intermediates/classes/debug' '-source' '1.7' '-target' '1.7' '-d' '/Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/intermediates/classes/debug' '-encoding' 'UTF-8' '-bootclasspath' '/Users/xiaoooyu/Library/Android/sdk/platforms/android-24/android.jar' '-g' '-sourcepath' '-processorpath' '/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-compiler/8.8.1/b2f4505a1babb7b7c11abbbf8ea4c90b18c3aeac/butterknife-compiler-8.8.1.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-annotations/8.8.1/bc373fb6bc7bca3035041b924f158fd2b946ee8d/butterknife-annotations-8.8.1.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.google.auto/auto-common/0.8/c6f7af0e57b9d69d81b05434ef9f3c5610d498c4/auto-common-0.8.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.squareup/javapoet/1.9.0/ecc5cf9c221d55481163e773b24336db149e51/javapoet-1.9.0.jar:/Users/xiaoooyu/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/25.3.0/support-annotations-25.3.0.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/19.0/6ce200f6b23222af3d8abb6b6459e6c44f4bb0e9/guava-19.0.jar' '-XDuseUnsharedTable=true' '-classpath' '/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-9.4.0.aar/94449de08789ec16b842095834ff6aff/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/design-24.2.1.aar/5d7148d3fb8bcf7b6a371f0473f9d7ab/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-cast-framework-9.4.0.aar/8ea61d18b3d0ca74200569045072a2f2/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-cast-9.4.0.aar/899689b26a7d7e970b9566bf3b68de24/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/mediarouter-v7-23.0.0.aar/8d1a468fb35abda470a1a41b82746e9b/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/mediarouter-v7-23.0.0.aar/8d1a468fb35abda470a1a41b82746e9b/jars/libs/internal_impl-23.0.0.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/appcompat-v7-24.2.1.aar/7b2c0b7bbcecfcd0140ca2b009d5b030/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/multidex-1.0.0.aar/ea334ba534b45066c21238b91c5ddb2b/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/butterknife-8.8.1.aar/c0c503fb429c80745255e6bb2ac9a0cc/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-ads-9.4.0.aar/6ca9ba7942944b6b1b887461d1067dd2/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-ads-lite-9.4.0.aar/4cc93bf3636e32a3ae2d0414d2ec166c/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-analytics-9.4.0.aar/8c09ed0855518093f90104fe87268408/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-tagmanager-9.4.0.aar/de0a01b84eeb321784e8aadd6df4eeeb/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-analytics-impl-9.4.0.aar/2a75e6a88c1fd7d3b4fa2542441cb56c/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-appinvite-9.4.0.aar/20077479a4585f67890d43cafca2e7d6/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-auth-9.4.0.aar/b3d79177ac2f1d2e5d659573d9407558/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-auth-base-9.4.0.aar/cd8dc3f32dadc7638665e983ce42a5c2/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-clearcut-9.4.0.aar/48123f830715703e788d93dc914b65e7/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-config-9.4.0.aar/8e931a251ebd44e2b60d69f872e221a2/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-contextmanager-9.4.0.aar/413b5e33fbe2ef3027d2321c45518487/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-crash-9.4.0.aar/d2c790acf7e9bcd4d390bbd594a2ea83/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-games-9.4.0.aar/3f2186bc8fa005f19ab3c6f855616ed0/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-drive-9.4.0.aar/aae0534e675ba3ef52a285f322dd21a5/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-auth-9.4.0.aar/c9ffd18d02551dab2a5b0c86be7f966d/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-auth-common-9.4.0.aar/131d6f37b03313aaba2b071495b83ecb/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-auth-module-9.4.0.aar/d49c51013b64af6632d6cf2410c26a9b/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-database-9.4.0.aar/d348e7453cbb48b7c4a55bce61e18549/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-database-connection-9.4.0.aar/f68bc5f6d7f58c9823e9e6819d4ce6f7/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-storage-9.4.0.aar/de87712bab6de96029f508c8eb12dcef/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-storage-common-9.4.0.aar/9364a98382508071d2d0bdfcb9a5da7e/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-fitness-9.4.0.aar/5b3c73e803917fedfffa073823cf6c63/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-gcm-9.4.0.aar/8a25e32b18d36441bfe9f54298046d42/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-appindexing-9.4.0.aar/87c2ee700c7e3637a820c1e06831527a/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-wallet-9.4.0.aar/77e668fdf213747b67d1f436e809a7bf/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-identity-9.4.0.aar/9294283941295da07269bab188b8be9a/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-iid-9.4.0.aar/fd95038d7f0a20a0891addb9ecf403c7/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-location-9.4.0.aar/dd096736d6cc99f7f91aeb85eeb11ad0/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-places-9.4.0.aar/a654a0d60bc54ca16ebcb2c1a91e5961/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-maps-9.4.0.aar/49d373c338ade9f863955eead23a1ee9/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-nearby-9.4.0.aar/1c9c17e9fca5497c15218467ebeec060/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-panorama-9.4.0.aar/e96c3ef89144c3722482cf542fd6ec57/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-plus-9.4.0.aar/ecd455a57ef04214312becb0aac2f162/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-safetynet-9.4.0.aar/351a77e56dad889dfaa1b40993ffd1f1/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-vision-9.4.0.aar/d09a9242a00679870a12ebfc2b2e16ff/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-wearable-9.4.0.aar/4815a050eb48e20dea3ed750934044df/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-base-9.4.0.aar/842af08da7e8ab6a81a0a50e5740adae/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-messaging-9.4.0.aar/4712e84d17fcefd05fc1b46122663699/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-tagmanager-api-9.4.0.aar/25e1cb43d64e824c2259f3cc19654ff5/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-analytics-9.4.0.aar/3a92f674a727c566947e403c4c450eff/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-analytics-impl-9.4.0.aar/7ade77aa27ef7fc2dfacc178832e8dba/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-iid-9.4.0.aar/3b9d2af6330b2c6708362df0426ee927/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/firebase-common-9.4.0.aar/2efeaccc36b62d52c0254b373221db64/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-gass-9.4.0.aar/0ad5030c3056c41a0d753309cc6aefbf/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-tasks-9.4.0.aar/adb48ed258def2a6151488e40865b3fe/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/play-services-basement-9.4.0.aar/d8a05c3d98858c814245b7c2b5bd1eba/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-v4-24.2.1.aar/d1732d25baf8173861ea3c64dab7f3a7/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/animated-vector-drawable-24.2.1.aar/7dc5728c758553363b8e66ee7f0b7345/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-vector-drawable-24.2.1.aar/13f5fe9ad19809a3d42b3af3e385bc7f/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/recyclerview-v7-24.2.1.aar/1939484b863163a414f9eb4bf62d43cd/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-annotations/8.8.1/bc373fb6bc7bca3035041b924f158fd2b946ee8d/butterknife-annotations-8.8.1.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-fragment-24.2.1.aar/6a9226bdf4c20c9927215091c4b2c38e/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-fragment-24.2.1.aar/6a9226bdf4c20c9927215091c4b2c38e/jars/libs/internal_impl-24.2.1.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-core-ui-24.2.1.aar/fbd16455675724f62352ef0396229766/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-core-ui-24.2.1.aar/fbd16455675724f62352ef0396229766/jars/libs/internal_impl-24.2.1.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-media-compat-24.2.1.aar/51c0ade069ab246d74a270ad135e958a/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-media-compat-24.2.1.aar/51c0ade069ab246d74a270ad135e958a/jars/libs/internal_impl-24.2.1.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-core-utils-24.2.1.aar/a4194a0907e27671ccaaed202c1bd184/jars/classes.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-core-utils-24.2.1.aar/a4194a0907e27671ccaaed202c1bd184/jars/libs/internal_impl-24.2.1.jar:/Users/xiaoooyu/.gradle/caches/transforms-1/files-1.1/support-compat-25.3.0.aar/3647a2bf54aec8d179e53b4fe9320ce2/jars/classes.jar:/Users/xiaoooyu/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/25.3.0/support-annotations-25.3.0.jar' '-s' '/Users/xiaoooyu/workspace/me/Run4ThirteenWeeks/mobile/build/generated/source/apt/debug'

Seems the argument '-processorpath' is invalid for javac. But they are all from the gradle dependencies.

jeremydubreil commented 6 years ago

-processorpath is a valid javac option. However, it seems that the argument for the -sourcepath is missing. In this case, javac will parse the command as - sourcepath -processorpath being one qualified option and the next option will be '/Users/xiaoooyu/.gradle/caches/modules-2/files-2.1/com.jakewharton/butterknife-... which is not a valid option as the error message suggests.

So I think that the command ought to be -sourcepath '', i.e. passing an empty string, and then -sourcepath '...'. So it seems that Infer is somehow swallowing the empty string option.

xiaoooyu commented 6 years ago

@jeremydubreil thanks for your time. Is there any workaround? I try to adding ' ' for -sourcepath manually, however infer seems generate new file every time.

jensborch commented 6 years ago

It think that if you modify infer/lib/python/inferlib/capture/gradle.py and change

arguments = list(filter(None, content.split(' ')))

to

arguments = []
for a in content.split(' '):
    if a != None:
        arguments.append(a)

it will work... haven't work with Python for a long time, so a better solution can probably be found.

jeremydubreil commented 6 years ago

@xiaoooyu, can you retry with the latest release of Infer? I think that @sblackshear already fixed this.

xiaoooyu commented 5 years ago

Checking on Infer v0.15.0, the issue not reproduced. Close it.