soot-oss / SootUp

A new version of Soot with a completely overhauled architecture
https://soot-oss.github.io/SootUp/
GNU Lesser General Public License v2.1
578 stars 77 forks source link

Getting started code from documentation does not work #686

Closed Gao-Chuan closed 1 year ago

Gao-Chuan commented 1 year ago

Here is the code from sootup website:

Path pathToBinary = Paths.get("src/test/resources/BasicSetup/binary");

AnalysisInputLocation<JavaSootClass> inputLocation = 
        PathBasedAnalysisInputLocation.createForClassContainer(pathToBinary);

JavaLanguage language = new JavaLanguage(8);

Project project = 
        JavaProject.builder(language).addInputLocation(inputLocation).build();

Here is the error:

error: cannot find symbol
        AnalysisInputLocation<JavaSootClass> inputLocation = PathBasedAnalysisInputLocation.createForClassContainer(pathToBinary);
                                                                                           ^
  symbol:   method createForClassContainer(Path)
  location: class PathBasedAnalysisInputLocation

I've checked the class sootup.java.bytecode.inputlocation.PathBasedAnalysisInputLocation and I'm sure there is no method called createForClassContainer.

Gao-Chuan commented 1 year ago

I'm using Maven Central. The latest version of sootup can't compile since this error:

Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find com.github.ThexXTURBOXx.dex2jar:dex-tools:v61.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/github/ThexXTURBOXx/dex2jar/dex-tools/v61/dex-tools-v61.pom
     Required by:
         project : > org.soot-oss:sootup.java.bytecode:1.1.2

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html