GithubHelp home page GithubHelp logo

Comments (10)

gitblit avatar gitblit commented on September 6, 2024 1

@ahmadazimi You are using a compiled jar. The step that fails is the Android dex step which converts Java bytecode in the jar to Dalvik bytecode to be assembled in your apk. I have no idea if there is a way to bypass this check in the Android toolchain.

from iciql.

gitblit avatar gitblit commented on September 6, 2024

This is likely caused by bundling the AutoClosable interface in the jar so that iciql can still be used by Java 6 but also enjoy try-catch-with-resources introduced in Java 7. Is it Gradle that complains or Google's toolchain? Is there a way to disable that verification?

from iciql.

ahmadazarnia avatar ahmadazarnia commented on September 6, 2024

Hi,

I'm using Android Studio and Gradle build system (I am newbie in gradle)
I've tried running app using command line with gradle and the full error report is:

trouble processing "java/lang/AutoCloseable.class":
Ill-advised or mistaken usage of a core class (java.* or javax.*)
when not building a core library.
This is often due to inadvertently including a core library file
in your application's project, when using an IDE (such as
Eclipse). If you are sure you're not intentionally defining a
core class, then this is the most likely explanation of what's
going on.
However, you might actually be trying to define a class in a core
namespace, the source of which you may have taken, for example,
from a non-Android virtual machine project. This will most
assuredly not work. At a minimum, it jeopardizes the
compatibility of your app with future versions of the platform.
It is also often of questionable legality.
If you really intend to build a core library -- which is only
appropriate as part of creating a full virtual machine
distribution, as opposed to compiling an application -- then use
the "--core-library" option to suppress this error message.
If you go ahead and use "--core-library" but are in fact
building an application, then be forewarned that your application
will still fail to build or run, at some point. Please be
prepared for angry customers who find, for example, that your
application ceases to function once they upgrade their operating
system. You will be to blame for this problem.
If you are legitimately using some code that happens to be in a
core package, then the easiest safe alternative you have is to
repackage that code. That is, move the classes in question into
your own package namespace. This means that they will never be in
conflict with core system classes. JarJar is a tool that may help
you in this endeavor. If you find that you cannot do this, then
that is an indication that the path you are on will ultimately
lead to pain, suffering, grief, and lamentation.
1 error; aborting
:app:transformClassesWithDexForDebug FAILED

Do you have any idea how can I disable checking this in gradle or android studio?

from iciql.

ahmadazimi avatar ahmadazimi commented on September 6, 2024

Hi there,

I have the same problem using this library in Android Studio with Gradle.
When I try to build my app, gradle stop working on a task and print an error log starts with these lines:

:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:prePackageMarkerForDebug
:app:transformClassesWithDexForDebug
trouble processing "java/lang/AutoCloseable.class":
Ill-advised or mistaken usage of a core class (java.* or javax.*)
when not building a core library.
This is often due to inadvertently including a core library file
in your application's project, when using an IDE (such as
Eclipse). If you are sure you're not intentionally defining a
core class, then this is the most likely explanation of what's
going on.

and continue like @ahmadazarnia log.

Is there any way to not use gradle and instead using a compiled jar file? Or this problem may fixed in gradle build system?

from iciql.

ahmadazimi avatar ahmadazimi commented on September 6, 2024

Thank you @gitblit
I'm trying to find a solution for it and If I find it, give it here.

from iciql.

ahmadazarnia avatar ahmadazarnia commented on September 6, 2024

Hi,I tried to get select from MyTable seen below:
MyTable m = new MyTable();
m = db.from(m).where(m._id).is(1).selectFirst();

but,I get below error while compile:
com.iciql.IciqlException: unmapped field in statement! SELECT FROM missions WHERE ? = ?

Please help me!

from iciql.

gitblit avatar gitblit commented on September 6, 2024

Show me MyTable.

from iciql.

ahmadazarnia avatar ahmadazarnia commented on September 6, 2024

It is MyTable:

@Iciql.IQTable(name = "MyTable")
public class DBMission {

@Iciql.IQColumn(primaryKey = true, autoIncrement = true)
public int _id;
@Iciql.IQColumn
public int server_id;
@Iciql.IQColumn
public int agent_id;
@Iciql.IQColumn
public String mission_name;
@Iciql.IQColumn
public String route_name;
@Iciql.IQColumn
public String assigned_at;
@Iciql.IQColumn
public String import_status;
@Iciql.IQColumn
public String description;
@Iciql.IQColumn
public boolean is_active;
@Iciql.IQColumn
public boolean is_remote_mission;

public DBMission() {
}

}

from iciql.

gitblit avatar gitblit commented on September 6, 2024

That looks fine. I've never used this on Android. Perhaps the dex step is discarding file names rendering reflection useless? You could specify a name for the fields in the annotation as a test.

from iciql.

gitblit avatar gitblit commented on September 6, 2024

Assuming issue has been resolved or OP has moved on.

from iciql.

Related Issues (18)

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.