Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resolve symbol SmaliLexer #9

Open
Honghe opened this issue May 12, 2015 · 6 comments
Open

Cannot resolve symbol SmaliLexer #9

Honghe opened this issue May 12, 2015 · 6 comments

Comments

@Honghe
Copy link

Honghe commented May 12, 2015

When build on 2.x branch, it occurs cannot resolve symbol SmaliLexer on file com.googlecode.d2j.smali.Smali.java.
What is the problem, and how to deal with?
Thanks!

@pxb1988
Copy link
Owner

pxb1988 commented May 12, 2015

The SmaliLexer is auto generate during the maven building progress. it is located under d2j-smali/build/generated-sources/antlr3

Please refer https://github.com/pxb1988/dex2jar/wiki/BuildFromSource for building instruction.

@Honghe
Copy link
Author

Honghe commented May 12, 2015

@pxb1988 I use Gradle on Android Studio to build this project, is it OK?
And the doc https://github.com/pxb1988/dex2jar/wiki/BuildFromSource seems to be out of date, cause the project has gradle script now.

@pxb1988
Copy link
Owner

pxb1988 commented May 13, 2015

Android Studio is Intellij IDEA based. it should works, here is a tutorial for import dex2jar into Integllij IDEA

  1. Click import Project, and then select dex2jar folder
    image
  2. Select Import project from external model -> Gradle, and Click Next
    image
  3. Select Use customizable gradle wrapper, and click Finish
    image
  4. Wait patiently
    image
  5. after the import, Click Gradle on the right side of the Intellij IDEA windows. navigate to
    dex2jar/dex2jar/Tasks/other/antlr2java, right click, then select Run '/home/...'
    image
    image
  6. now click the Project Structure icon on the toolbar
    image
  7. Remove the exclusion of build folder
    selectModules -> d2j-smali -> build, then Click Excluded
    image
  8. Select build/generated-sources/antlr and Click Sources
    image
  9. Click the Depedencies of d2j-smali
    Click the + icon on the right or bottom side, then select Module Dependency
    image
    Select d2j-base-cmd and dex-writer, then Click Ok
    image
    image
  10. Repeat Step 7,8 to setup antlr code for d2j-jasmin
  11. Repeat Step 9 to add d2j-base-cmd to Depedencies of d2j-jasmin
  12. Now the code is ready on IDEA, have fun !

@Honghe
Copy link
Author

Honghe commented May 13, 2015

@pxb1988
Sorry, it is a bit Complicated.

  1. Cannot find d2j-base-cmd and dex-writer on the Depedencies of d2j-smali.
    image
  2. After add d2j-base-cmd to the Depedencies of d2j-jasmin, it still cannot import JasminLexer on Jasmin2JarCmd.java
    image
  3. And, What to do next after step 10?

@pxb1988
Copy link
Owner

pxb1988 commented May 13, 2015

update step 9,10,11
update https://github.com/pxb1988/dex2jar/wiki/BuildFromSource

@Honghe
Copy link
Author

Honghe commented May 13, 2015

@pxb1988
Bingo. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants