Ich habe im Grunde einen Startbildschirm mit dem törichten Code ... Ich bemerkte, dass wenn ich es in den meisten Android-Geräten läuft, funktioniert es aber nur in Samsung-Geräten (nicht abhängig von der Bildschirmgröße, ich getestet auf 4 Geräte) es einen Absturz mit diesem Fehler verursacht ...App stürzt nur auf Samsung Geräten ab
LogCat- https://gist.github.com/anonymous/2c06feb8643dc1381db39b64e0834942
Crash--
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{inc.bs.ksit/inc.bs.ksit.Splash}: android.view.InflateException: Binary XML file line #20: Error inflating class android.widget.ImageView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2114)
Layout-Datei
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:background="@color/white"
android:layout_width="match_parent" android:layout_height="match_parent">
<TextView
android:text="@string/app_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageView"
android:layout_centerHorizontal="true"
android:layout_marginTop="48dp"
android:textSize="50sp"
android:id="@+id/textView13"
android:textStyle="bold"
android:textColor="@color/colorPrimaryDark" />
<ImageView
android:layout_width="170dp"
android:layout_height="200dp"
android:background="@drawable/images"
android:layout_marginTop="50dp"
android:id="@+id/imageView"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<TextView
android:text="Powered by BS "
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView13"
android:layout_centerHorizontal="true"
android:id="@+id/textView14" />
</RelativeLayout>
es funktioniert auf allen anderen Geräten, irgendwelche Ideen?
Splash Aktivität
public class Splash extends Activity {
// Splash screen timer
private static int SPLASH_TIME_OUT = 400;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Log.d("tag","splash");
new Handler().postDelayed(new Runnable() {
/*
* Showing splash screen with a timer. This will be useful when you
* want to show case your app logo/company
*/
@Override
public void run() {
// This method will be executed once the timer is over
// Start your app main activity
Intent i = new Intent(Splash.this, MainActivity.class);
startActivity(i);
// close this activity
finish();
}
}, SPLASH_TIME_OUT);
}
}
Code setzen und auch vollständiges Protokoll bitte –
wird dies in einem ein paar Minuten ... Irgendein Formatierungsproblem kam, als ich es versuchte, also konnte ich nicht hochladen – Firewolf
Ist die Bildgröße zu groß? Haben Sie versucht, gleiche App auf Samsung neuesten Handys (mit verbesserter Hardware) – Swarnveer