Git Product home page Git Product logo

Comments (13)

jvillard avatar jvillard commented on May 18, 2024

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.

ahmtbrk avatar ahmtbrk commented on May 18, 2024

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.

jvillard avatar jvillard commented on May 18, 2024

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.

ahmtbrk avatar ahmtbrk commented on May 18, 2024

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.

jvillard avatar jvillard commented on May 18, 2024

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.

ahmtbrk avatar ahmtbrk commented on May 18, 2024

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.

jvillard avatar jvillard commented on May 18, 2024

Looks like an issue with infer. Does ant on its own build anything after cleaning in Eclipse?

from infer.

ahmtbrk avatar ahmtbrk commented on May 18, 2024

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.

jvillard avatar jvillard commented on May 18, 2024

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.

ahmtbrk avatar ahmtbrk commented on May 18, 2024

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.

adenisonafifi avatar adenisonafifi commented on May 18, 2024

[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.

jvillard avatar jvillard commented on May 18, 2024

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.

adolf2v avatar adolf2v commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.