Comments (13)
Hi @ahmtbrk,
Thanks for your report. Infer supports ant. You can run Infer on your ant project with
ant clean
infer -- ant compile
You can replace ant compile
with the ant command you use to build your project.
We'll add these steps to the website. Let me know if they work for you.
from infer.
Hi @jvillard
Thanks for help.
But i got a error during ant clean
/Users/AhmtBrK/Library/Android/sdk/tools/ant/build.xml:470: The following error occurred while executing this line:
Target "nodeps" does not exist in the project "null".
from infer.
Sorry, I wrote ant clean
but you should use the command you normally use to clean your project. It looks like in Eclipse this is "Project -> Clean...".
from infer.
Okey.I used clean via Eclipse.After i tried infer -- ant compile and i got error again.
macbook-MacBook-Pro:AkilliEv AhmtBrK$ infer -- ant compile
BUILD FAILED
Target "compile" does not exist in the project "SplashActivity".
at org.apache.tools.ant.Project.tsort(Project.java:1929)
at org.apache.tools.ant.Project.topoSort(Project.java:1837)
at org.apache.tools.ant.Project.topoSort(Project.java:1800)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:853)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Total time: 0 seconds
from infer.
I am not very familiar with ant builds generated from Eclipse, sorry. Does infer -- ant
work for you? Or perhaps infer -- ant -f build.xml
?
from infer.
No problem @jvillard.
I used infer -- ant and infer -- ant -f build.xml but terminal moved to the bottom line(new line).
Like this;
macbook-MacBook-Pro:AkilliEv AhmtBrK$ infer -- ant
macbook-MacBook-Pro:AkilliEv AhmtBrK$
from infer.
Looks like an issue with infer. Does ant
on its own build anything after cleaning in Eclipse?
from infer.
Hi @jvillard
i ran this command only "ant"
Output;
macbook-MacBook-Pro:AkilliEv AhmtBrK$ ant
Buildfile: /Users/AhmtBrK/Documents/SmartHomeWorkspace/akilli-ev-android/AkilliEv/build.xml
help:
[echo] Android Ant Build. Available targets:
[echo] help: Displays this help.
[echo] clean: Removes output files created by other targets.
[echo] This calls the same target on all dependent projects.
[echo] Use 'ant nodeps clean' to only clean the local project
[echo] debug: Builds the application and signs it with a debug key.
[echo] The 'nodeps' target can be used to only build the
[echo] current project and ignore the libraries using:
[echo] 'ant nodeps debug'
[echo] release: Builds the application. The generated apk file must be
[echo] signed before it is published.
[echo] The 'nodeps' target can be used to only build the
[echo] current project and ignore the libraries using:
[echo] 'ant nodeps release'
[echo] instrument:Builds an instrumented package and signs it with a
[echo] debug key.
[echo] test: Runs the tests. Project must be a test project and
[echo] must have been built. Typical usage would be:
[echo] ant [emma] debug install test
[echo] emma: Transiently enables code coverage for subsequent
[echo] targets.
[echo] install: Installs the newly build package. Must either be used
[echo] in conjunction with a build target (debug/release/
[echo] instrument) or with the proper suffix indicating
[echo] which package to install (see below).
[echo] If the application was previously installed, the
[echo] application is reinstalled if the signature matches.
[echo] installd: Installs (only) the debug package.
[echo] installr: Installs (only) the release package.
[echo] installi: Installs (only) the instrumented package.
[echo] installt: Installs (only) the test and tested packages (unless
[echo] nodeps is used as well.
[echo] uninstall: Uninstalls the application from a running emulator or
[echo] device. Also uninstall tested package if applicable
[echo] unless 'nodeps' is used as well.
BUILD SUCCESSFUL
Total time: 0 seconds
but i ran "ant compile"
Output;
macbook-MacBook-Pro:AkilliEv AhmtBrK$ ant compile
Buildfile: /Users/AhmtBrK/Documents/SmartHomeWorkspace/akilli-ev-android/AkilliEv/build.xml
BUILD FAILED
Target "compile" does not exist in the project "SplashActivity".
Total time: 0 seconds
from infer.
Try with one of the targets given by ant
, for example ant debug
. If this work, clean the project in Eclipse then run infer -- ant debug
.
from infer.
yeah i tried ant debug but i got an error
[aapt] invalid resource directory name: /Users/AhmtBrK/Documents/SmartHomeWorkspace/akilli-ev-android/ViewPageIndicator/bin/res crunch
BUILD FAILED
/Users/AhmtBrK/Library/Android/sdk/tools/ant/build.xml:597: The following error occurred while executing this line:
/Users/AhmtBrK/Library/Android/sdk/tools/ant/build.xml:649: The following error occurred while executing this line:
/Users/AhmtBrK/Library/Android/sdk/tools/ant/build.xml:694: null returned: 1
As far as I understand "ant debug" command is true but my project is more complex.
So I think that was a mistake.
Many thanks for the help
from infer.
[aapt] invalid resource directory name: /Users/AhmtBrK/Documents/SmartHomeWorkspace/akilli-ev-android/ViewPageIndicator/bin/res crunch
This error normally indicates that you need to execute an ant clean
.
For example: infer -- ant clean debug
from the Android/ directory.
from infer.
Hi @ahmtbrk, I'm closing this issue since the problem seems to be related to finding the right ant command to build your project rather than something Infer-specific.
Feel free to post the solution to your problem, or to re-open the issue if you have more questions.
from infer.
In my case , ant debug.
the following is the available targets.
[echo] **clean:** Removes output files created by other targets. This calls the same target on all dependent projects. Use 'ant nodeps clean' to only clean the local project [echo] **debug:** Builds the application and signs it with a debug key. The 'nodeps' target can be used to only build the current project and ignore the libraries using: 'ant nodeps debug' [echo] **release:** Builds the application. The generated apk file must be signed before it is published. The 'nodeps' target can be used to only build the current project and ignore the libraries using: 'ant nodeps release' [echo] **instrument:**Builds an instrumented package and signs it with a debug key. [echo] **test:** Runs the tests. Project must be a test project and must have been built. Typical usage would be: ant [emma] debug install test [echo] **emma:** Transiently enables code coverage for subsequent targets. [echo] **install:** Installs the newly build package. Must either be used in conjunction with a build target (debug/release/ instrument) or with the proper suffix indicating which package to install (see below). If the application was previously installed, the application is reinstalled if the signature matches. [echo] **installd:** Installs (only) the debug package. [echo] **installr:** Installs (only) the release package. [echo] **installi:** Installs (only) the instrumented package. [echo] **installt:** Installs (only) the test and tested packages (unless nodeps is used as well. [echo] **uninstall:** Uninstalls the application from a running emulator or device. Also uninstall tested package if applicable unless 'nodeps' is used as well.
from infer.
Related Issues (20)
- C Simple memory leak cannot be detected HOT 1
- [java] DEADLOCK: False Negative in Infer analysis results after converting anonymous classes to lambda expressions HOT 1
- [java] STARVATION: False Negative in Infer analysis results after converting anonymous classes to lambda expressions HOT 1
- False positive of Infer/Pulse when `std::unique_ptr` is used with no throw `new` HOT 2
- how to use --custom-symbols?
- How to check custom malloc and free functions for memory leak?
- can infer find out all suspecious bugs? HOT 2
- java: Infer injects outdated, buggy maven-compiler-plugin version 3.8.0
- False positive memory leak on loop HOT 4
- Dockerfile: US-ASCII locale causes crash on UTF-8 input
- How to add extra nullability condition to NULL_DEREFERENCE checking
- Is Adding a C++ Infer Port to the VSCode Plugin on the Roadmap? HOT 3
- [java] A false negative about the rule NULL_DEREFERENCE
- [java] A false positive about the rule THREAD_SAFETY_VIOLATION
- `--biabduction-unsafe-malloc` doesn't assume that `calloc()` and `realloc()` never return null HOT 1
- Error building the `Resource Leak analysis` lab in docker
- False positive Uninitialized Value in C code
- Need help when using infer run or capture during maven compilation HOT 1
- Query on --changed-files-index option HOT 3
- Meta leak HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from infer.