2013-06-22 6 views
13

Ich habe ein paar Fragen zu diesem Thema gesehen, aber wenn ich nach dem anderen Teil suche, habe ich in meinem Fehler, finde ich nichts Also habe ich beschlossen, eine Frage mit der vollständigen Erklärung zu stellen.Konvertierung in Dalvik-Format fehlgeschlagen mit Fehler 1 mit einer gruseligen Nachricht in der Konsolenansicht

In meinem Code sind keine Fehler erkannt. Nirgends. Alle Bibliotheken werden hinzugefügt, externe Bibliotheksprojekte werden erfolgreich verknüpft. Es gibt keine Anzeichen dafür, dass bei einem Start etwas schief gehen sollte.

Beim Starten der Anwendung - Ausführen, kompilieren und erstellen (automatisch) - erhalte ich eine Popup-Meldung, dass mein Projekt Fehler enthält und dass ich sie beheben sollte, bevor ich versuche, die Anwendung erneut zu starten .

Also ich fummle mit einigen Eigenschaften herum, mein Kollege entdeckt, dass "Android Private Libraries" in Properties -> Java Build Path -> Order and Export überprüft werden muss (was ich zuvor zusammen mit den anderen Kontrollkästchen nicht abgehakt habe). Aber wenn ich die Anwendung ausführen - gleiches Pop-up, und die folgend in der Console Ansicht: (beängstigend Nachricht)

[2013-06-22 20:55:03 - TheApplication] Dx 
trouble processing "java/sql/Savepoint.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. 

[2013-06-22 20:55:03 - TheApplication] Dx 1 error; aborting 
[2013-06-22 20:55:03 - TheApplication] Conversion to Dalvik format failed with error 1 

Hat jemand diese Nachricht, bevor bekommen? Warum bekomme ich es? Wo soll ich nach "versteckten Bibliotheken" oder "internen Bibliotheken" suchen, die mir vielleicht gar nicht bewusst sind?

Ich habe mit meinem Chef und Kollegen überprüft - sie haben alle die gleichen Bibliotheken im Projekt (da wir gemeinsam daran arbeiten, müssen wir natürlich die gleichen Dinge haben). Wohin soll ich gehen, um dieses Problem zu beheben?

Antwort

4

Hat jemand diese Nachricht schon einmal bekommen?

Ja. Aber nicht seit 2009.

Warum bekomme ich es?

Da im Quellcode Ihres Projekts oder in einem JAR, haben Sie eine weitere Kopie der java.sql.Savepoint Schnittstelle, andere als die, die aus dem Android Runtime kommt.

Wo soll ich nach "versteckten Bibliotheken" oder "internen Bibliotheken" suchen, die mir vielleicht gar nicht bewusst sind?

Ihr Eclipse-Klassenpfad. Vielleicht möchten Sie Ihre Frage mit einem Screenshot Ihres "Order & Export" -Bildschirms aus dem Build-Pfad-Dialog bearbeiten.

15

Ich löse das Entfernen android.jar in Registerkarte "Bestellung und Export" im Projekt und in den Bibliotheken.

+0

+1 Ja ... das löste das Problem für mich ... – user755499

+0

Ich weiß nicht, warum das passiert, aber es löst das Problem –

+0

Anstatt all diese Scheiße zu schreiben ... warum fragen sie uns nicht einfach entferne es ... (Übrigens, es war bereits abgewählt ... Ich dachte, dass es versehentlich war, also habe ich es ausgewählt. In diesem Moment gab es keinen Fehler. Aber zu einem späteren Zeitpunkt, als ich mein Projekt säuberte, passierte es.) –

1

Hatte das gleiche Problem.

Die folgende Aktion hat mir geholfen, diese Fehlermeldung loszuwerden.

1) Zum Project--> properties-->Java Build Path

2) Wählen Sie Order and Export tab

3) Deaktivieren Sie das Android Private Libraries und Android Dependencies und klicken ok

enter image description here

Danach wird die Anwendung wurde erfolgreich gestartet.

+0

aber Sie können diese Android-Bibliotheken ... zum Beispiel v4/v7-Support-Bibliotheken – Jasper

Verwandte Themen