Git Product home page Git Product logo

Comments (3)

CybIam avatar CybIam commented on September 28, 2024 1

Figred it out.
I added class and method references wrong way. When implementing new class or method one should add reference to *Definition class not *Reference.

Thanks!

from dexer.

sailro avatar sailro commented on September 28, 2024

Something like this:

		var dex = new Dex();

		var cref = new ClassReference("fullname");
		dex.Import(cref);

		var returntype = PrimitiveType.Void;
		dex.Import(returntype);

		var parameterType = PrimitiveType.Int;
		var parameter = new Parameter(parameterType);
		dex.Import(parameterType);

		Prototype prototype = new Prototype(returntype, parameter);
		var mref = new MethodReference(cref, "methodname", prototype);
		dex.Import(mref);

		dex.Write("output.dex");

When you start from scratch, or when you need to add new stuff, you have to make sure all the types you plan to use are properly imported in the system.

from dexer.

CybIam avatar CybIam commented on September 28, 2024

@sailro, thanks for fast response!

a bit of clarification - I need to write down method instructions.

ps
Of course I added all references (classes, fields, methods) so all lookup collections have them. Either I do something wrong (order wise) or there might be some bug with objects comparison.

from dexer.

Related Issues (9)

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.