[OFFEN] App schließt nach Öffnen sofort

  • 14 Antworten
  • Letztes Antwortdatum
R

rn42v1r

Neues Mitglied
0
Hallo liebe Community,
konnte bis jetzt keine Lösung für mein Problem finden. Auf stackoverflow konnte man mir auch leider nicht helfen.
Ich schreibe momentan meine erste app und wollte hierfür ein tabhost einrichten, was nicht ganz funktioniert.
Compilen tut alles, will ich die app jedoch mit meinem handy testen, schließt sie sich sofort wieder.
Hier meine logcat:
Dropbox - log.txt

Nachträglich von Mod eingefügt
Code:
09-03 01:32:26.420: E/HAL(18436): load: id=gralloc != hmi->id=gralloc
09-03 01:32:26.479: W/art(18436): Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/avoid.myapplication-1/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@avoid.myapplication-1@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
09-03 01:32:26.628: W/art(18436): Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/avoid.myapplication-1/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@avoid.myapplication-1@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status
09-03 01:32:26.674: W/art(18436): Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/avoid.myapplication-1/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@avoid.myapplication-1@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
09-03 01:32:26.719: W/art(18436): Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/avoid.myapplication-1/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@avoid.myapplication-1@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
09-03 01:32:26.769: W/art(18436): Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/avoid.myapplication-1/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@avoid.myapplication-1@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
09-03 01:32:26.821: W/art(18436): Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/avoid.myapplication-1/split_lib_slice_4_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@avoid.myapplication-1@split_lib_slice_4_apk.apk@classes.dex) because non-0 exit status
09-03 01:32:26.867: W/art(18436): Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/avoid.myapplication-1/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@avoid.myapplication-1@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
09-03 01:32:26.914: W/art(18436): Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/avoid.myapplication-1/split_lib_slice_6_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@avoid.myapplication-1@split_lib_slice_6_apk.apk@classes.dex) because non-0 exit status
09-03 01:32:26.960: W/art(18436): Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/avoid.myapplication-1/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@avoid.myapplication-1@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status
09-03 01:32:27.008: W/art(18436): Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/avoid.myapplication-1/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@avoid.myapplication-1@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status
09-03 01:32:27.056: W/art(18436): Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg  --debuggable --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/avoid.myapplication-1/split_lib_slice_9_apk.apk --oat-file=/data/dalvik-cache/arm64/data@app@avoid.myapplication-1@split_lib_slice_9_apk.apk@classes.dex) because non-0 exit status
09-03 01:32:27.058: W/System(18436): ClassLoader referenced unknown path: /data/app/avoid.myapplication-1/lib/arm64
09-03 01:32:27.065: I/InstantRun(18436): starting instant run server: is main process
09-03 01:32:27.126: I/HwCust(18436): Constructor found for class android.app.HwCustHwWallpaperManagerImpl
09-03 01:32:27.152: W/art(18436): Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
09-03 01:32:27.624: I/Process(18436): Sending signal. PID: 18436 SIG: 9




Danke im Voraus
 
Zuletzt bearbeitet von einem Moderator:
Hallo rn42

.. willkommen im Forum .

Wir möchten Dich bitten, Anhänge , Codes, Logs hier im Thread mit den Tags einzubinden, damit auch
User , die die Frage später lesen, Zugriff darauf haben. Ich habe das für dich oben nachgeholt.


Zu deiner Frage :

Womit entwickelst du denn ?
Wir unterstützen in diesem Forum die Entwicklung unter Java / C++ in AndroidStudio und der von Dir
oben gepostete Log ist nicht der ErrorLog aus diesem.

Dann benötigen wir den Source Code dazu, an welcher Stelle dein Programm abstürzt .

Lies Dir bitte das hier dazu durch
[LEITFADEN] Wie bekomme ich hier die effektivste Hilfe ?
 
Zuletzt bearbeitet:
  • Danke
Reaktionen: lordzwieback
Moin und willkommen. Ein wenig mehr Code wäre schon nötig, um dein Problem zu lösen. Hellseher sind wir hier leider noch nicht. ;)

Zeig mal das OnCreate deiner Acitivty und dein Layout XML File her.
 
@swa00 Ich nutze Android Studio. Der von dir nachgetragene code (danke dafür) ist meine logcat, welche eig aus Android Studio kommt...
 
Hallo rn,

das ist allerdings kein ErrorLog und nach wie vor fehlt uns dazu der Source, an welcher Stelle du das
Exception hast.

Ohne diese Infos können wir dir nicht helfen , denn unsere Kristallkugel ist leider nur beschränkt
leistungsfähig :)
 
@lordzwieback
Stimme ich dir zu, wäre auch zu schön.

Meine MainActivity:
<code>
package avoid.skatblock;

import android.support.v7.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

public class MainActivity extends AppCompatActivity {
@override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

TabHost tabHost = (TabHost) findViewById(android.R.id.tabhost);
TabHost.TabSpec spec;
Intent intent;

spec = tabHost.newTabSpec("Farbspiel");
spec.setIndicator("Farbspiel");
intent = new Intent(this, FarbspielActivity.class);
spec.setContent(intent);
tabHost.addTab(spec);

spec = tabHost.newTabSpec("Grand");
spec.setIndicator("Grand");
intent = new Intent(this, GrandActivity.class);
spec.setContent(intent);
tabHost.addTab(spec);

spec = tabHost.newTabSpec("Null");
spec.setIndicator("Null");
intent = new Intent(this, NullActivity.class);
spec.setContent(intent);
tabHost.addTab(spec);

spec = tabHost.newTabSpec("Ramsch");
spec.setIndicator("Ramsch");
intent = new Intent(this, RamschActivity.class);
spec.setContent(intent);
tabHost.addTab(spec);

tabHost.setCurrentTab(1);

}
}
</code>

und meine activity_main.xml:
<code>
<?xml version="1.0" encoding="UTF-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">

<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1" />

<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="-4dp"
android:layout_weight="0" />

</LinearLayout>

</TabHost>
</code>

Für jeden Tab habe ich nochmal eine extra Klasse erstellt, in der jedoch momentan lediglich die onCreate Funktion
mit super.onCreate und setContentview(dazugehörige xml) ist.
[doublepost=1504508807,1504508310][/doublepost]
swa00 schrieb:
@swa00
Hallo rn,

das ist allerdings kein ErrorLog und nach wie vor fehlt uns dazu der Source, an welcher Stelle du das
Exception hast.

Ohne diese Infos können wir dir nicht helfen , denn unsere Kristallkugel ist leider nur beschränkt
leistungsfähig :)
<code>
Executing tasks: [:app:assembleDebug]

Configuration on demand is an incubating feature.
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to D:\Users\Marvin\AppData\Local\Android\sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

Incremental java compilation is an incubating feature.
:app:buildInfoDebugLoader
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:prepareComAndroidSupportAnimatedVectorDrawable2531Library
:app:prepareComAndroidSupportAppcompatV72531Library
:app:prepareComAndroidSupportConstraintConstraintLayout102Library
:app:prepareComAndroidSupportSupportCompat2531Library
:app:prepareComAndroidSupportSupportCoreUi2531Library
:app:prepareComAndroidSupportSupportCoreUtils2531Library
:app:prepareComAndroidSupportSupportFragment2531Library
:app:prepareComAndroidSupportSupportMediaCompat2531Library
:app:prepareComAndroidSupportSupportV42531Library
:app:prepareComAndroidSupportSupportVectorDrawable2531Library
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:packageInstantRunResourcesDebug UP-TO-DATE
:app:fastDeployDebugExtractor UP-TO-DATE
:app:generateDebugInstantRunAppInfo UP-TO-DATE
:app:checkManifestChangesDebug
:app:transformClassesWithExtractJarsForDebug UP-TO-DATE
:app:transformClassesWithInstantRunVerifierForDebug UP-TO-DATE
:app:transformClassesWithDependencyCheckerForDebug UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:app:transformNativeLibsAndResourcesWithJavaResourcesVerifierForDebug UP-TO-DATE
:app:transformClassesWithInstantRunForDebug UP-TO-DATE
:app:transformClassesEnhancedWithInstantReloadDexForDebug
:app:incrementalDebugTasks
:app:preColdswapDebug
:app:transformClassesWithInstantRunSlicerForDebug UP-TO-DATE
:app:transformClassesWithDexForDebug UP-TO-DATE
:app:validateSigningDebug
:app:transformDexWithInstantRunDependenciesApkForDebug UP-TO-DATE
:app:transformDexWithInstantRunSlicesApkForDebug UP-TO-DATE
:app:packageDebug UP-TO-DATE
:app:buildInfoGeneratorDebug
:app:compileDebugSources UP-TO-DATE
:app:assembleDebug

BUILD SUCCESSFUL

Total time: 2.087 secs
</code>
Ist der gemeint? Tut mir leid, nutze Android Studio erst seit kurzem
 

Leider nein :-(

Jetzt hast du uns den CompileLog geschickt.
Starte deine app - und im LogCat fenster gehe auf Error - wähle die "Show only selected Application".
Wenn die app abgestützt ist, dann scrolle das Ergebnis , bis es irgendwo rot wird und der Part ist dann der Errorlog
 
@swa00
swa00 schrieb:

Leider nein :-(

Jetzt hast du uns den CompileLog geschickt.
Starte deine app - und im LogCat fenster gehe auf Error - wähle die "Show only selected Application".
Wenn die app abgestützt ist, dann scrolle das Ergebnis , bis es irgendwo rot wird und der Part ist dann der Errorlog
Ok, habs glaube ich ^^...

09-04 14:52:25.001 24993-25008/avoid.skatblock E/HAL: load: id=gralloc != hmi->id=gralloc

mehr ist da nicht
 
nein auch nicht ...

das sind angaben mit dem jeweiligen Java-File , dass du selbst erstellst hast und ein Exception ....

Wenn du das nicht posten kannst , dann solltest du nach dem Ausschlussverfahren vorgehen.
Mehr können wir von dieser Seite her nicht tun .
 
Angaben mit Java-File werden nicht gemacht, mehr spuckt der android monitor leider nicht aus...
Werde im Internet nach vorgefertigten Tabhost suchen und dann übertragen.

Ich bedanke mich für eure Zeit :)
[doublepost=1504532371,1504531002][/doublepost]
Update:
Habe nun via try and error code eines vorgefertigten funktionierenden Tabhost Szenario abgeändert und siehe da, es funktioniert...
Musste lediglich die Superclass der MainActivity von AppCompatActivity auf TabActivity ändern.
Wisst ihr warum mir dieser Fehler nicht angezeigt wurde?
 
Eigentlich müsste dir AS bereits beim Erstellen eine Incompatibilität angezeigt haben .
Schau dazu mal immer auf der rechten Seite die kleinen gelben Balken.

Ich gehe davon aus , dass du in den Einstellungen in AS verändert hast
a) weil es dir beim Editieren nicht angezeigt worden ist
b) dein Fehler oben müsste die definitv ein ErrorLog ausgegeben haben ..

Und da beides nicht dir gegeben wurde, hast du AS verändert - das ist eigentlich
das Wichtigste , was du zum Coden benötigst.

Gerade wenn du noch nach Paste & Copy arbeitest
 
Das kann durchaus sein, mir wird gesagt, dass die TabActivity Klasse veraltet ist (im code sogar durchgestrichen).
Ist das nun schlimm? Funktionieren tut ja jetzt alles...
 
"Deprecated" ist "deprecated", das heisst , es wird nicht funktionieren -
Vielleicht jetzt bei dir , oder vielleicht auf ein paar anderen Geräten .

Nicht umsonst kommt der Hinweis.

Dein Problem ist , dass du aus dem Internet kopierst und eine Try & Hope Entwicklung betreibst,
Aber fundamental ist das leider nicht :)

Du kannst zu über 90% davon ausgehen , dass das was du im Inet findest nicht so funktioniert und veraltet ist
Erst recht nicht nach YT Videos.

Hilfen sollen lediglich als Anhaltspunkt zur Dokumentation dienen , mehr nicht
 
Nun gut, werde dann weiter versuchen eigenen code zu verwenden.

Danke für die Hilfe
 
Hi @m42v1r,

ich habe gerade in deine Log Files geschaut. Dein Problem liegt an Instant Run.
(Die betreffende Fehlermeldung: .... Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable)

Das funktioniert erst ab Android Level 15 (4.1). Du muss das überflüssige Teil einfach nur deaktivieren, oder den Min Level hoch setzen.

Genauere Erklärung hier:

First launch take long time (ClassLoader referenced unknown path)
 
  • Danke
Reaktionen: lordzwieback

Ähnliche Themen

G
Antworten
0
Aufrufe
110
Gerdchen07
G
G
Antworten
1
Aufrufe
370
Gerdchen07
G
G
Antworten
13
Aufrufe
583
Gerdchen07
G
L
Antworten
2
Aufrufe
484
Lexub
L
migi01
Antworten
26
Aufrufe
1.938
migi01
migi01
Zurück
Oben Unten