inflate-exception

Android - InflateException: Binary XML file line #7

江枫思渺然 提交于 2019-12-24 14:16:01
问题 I was wondering, I have the following source code files: MainActivity.java package com.example.bmtitest2; import android.os.Bundle; import android.app.Activity; import android.app.AlertDialog; public class MainActivity extends Activity { private JavaAbstractionLayer abstr; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); abstr = (JavaAbstractionLayer) findViewById(R.id.abstraction); abstr.invalidate(); }

android.view.InflateException: Binary XML file line #39: Error inflating class

巧了我就是萌 提交于 2019-12-23 05:13:00
问题 I'm facing the given problem. On galaxy s2 everything works well, on noname android 2.3 (phone and 7' tablet) - everythings is ok. But galaxy tab2 and note2 gives this error. Here is the stack trace: 06-27 21:28:20.659: E/AndroidRuntime(23924): FATAL EXCEPTION: main 06-27 21:28:20.659: E/AndroidRuntime(23924): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myPackage.myProject/com.myPackage.myProject.MainActivity}: android.view.InflateException: Binary XML file line #39

SplashScreen using PNG image leads to Android.Views.InflateException followed by OutOfMemory

会有一股神秘感。 提交于 2019-12-22 08:56:13
问题 I watched Google IO 2011 conference, read almost every post about OutOfMemory Exception and InflateException, no luck, I cannot find any answer that solve my problem. How can I properly clear memory from a layout containing a background image? I feel like if the InflateException followed by OutOfMemory are related because that background image is not cleared properly. So I'm getting : Android.Views.InflateException: Binary XML file line #24: Error inflating class followed by : Java.Lang

RuntimeException: native typeface cannot be made or memory leak for custom TextView loading font

若如初见. 提交于 2019-12-18 17:25:43
问题 There's a HUGE problem in my code wherein I am loading a font in my assets\fonts\ folder from a custom TextView class. The first problem is that it crashes on 4.0 devices with the exception Caused by: java.lang.RuntimeException: native typeface cannot be made . I was using the same process here with the method: public class MyTextView extends TextView { public MyTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } public MyTextView(Context context,

Error inflating class CollapsingToolbarLayout

夙愿已清 提交于 2019-12-17 10:44:54
问题 My CollapsingToolbarLayout crashes because of Error inflating class android.support.design.widget.CollapsingToolbarLayout. I updated the android studio last weekend. Before the updated, it works fine. After I updated it, it crashed. However, I tried to downgrade it to 2.0.0 version and it's not working anymore. My coworker has no problem with the CollapsingToolbarLayout. I am not sure what happened. The error was: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test

NPE while inflating layout (Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference)

浪尽此生 提交于 2019-12-16 22:50:12
问题 I keep getting a java.lang.NullPointerException when I try to use ScrollView in an activity. The weird thing is that I've used the exact same Scrollview setup in other activities. And all of a sudden I'm getting errors. I've tried cleaning the project and rebuilding. And I've tried the good old restart the program. I learned a lot about Null Pointer Exceptions today, but I haven't been able to figure out why I keep getting Rendering Problems . This is the java.lang.NullPointerException that

Error inflating class ImageView

孤者浪人 提交于 2019-12-12 07:45:03
问题 I've been getting InflateException/ClassNotFoundException error intermittently. I've seen similar errors before in SO but they were caused by spelling errors. I spelled 'ImageView' correctly so I don't know what's causing the error. The code where the error occurs is: v = View.inflate(getContext(), R.layout.event_show_row_layout, null); Here's the layout xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width=

Android Studio project works on Lollipop but does not work on Kitkat

可紊 提交于 2019-12-12 07:27:13
问题 I have an Android Studio project that is working fine on devices with Android build version Lollipop but is throwing an exception when trying to run it on a device with android build version Kitkat. This is my project's build.gradle file: android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { minSdkVersion 16 targetSdkVersion 21 versionCode 1 versionName "1.0" multiDexEnabled true renderscriptTargetApi 22 renderscriptSupportModeEnabled true } } dependencies { compile

Caused by: android.view.InflateException Error inflating class in Android app

怎甘沉沦 提交于 2019-12-12 03:26:49
问题 I've been developing an app for a week now and everything was going fine. I wasn't having any troubles with any of the 3 devices in which I test the Apps I develope. But now I just runned the app on one of these three devices and everything went to hell. The weirdest thing is that the app works perfectly on the other two devices but on the third one it crashes on the first onCreate() call. I sincerely don't know what am I doing wrong that it's not working on one of my devices. Here's my code.

android binary xml exception when changing pictures

[亡魂溺海] 提交于 2019-12-11 08:24:13
问题 I'm developing an android app, it's about multilingual story. In this app I can switch from a language to another. Of course this application contains several images and texts. In the arabic language some photos need to be flipped, in the following code I'm flipping 4 images: if (i == 0) { rightImages[i].setImageResource(R.drawable.coverar); } if (i == 1) { rightImages[i].setImageResource(R.drawable.page1ar); } if (i == 4)// for the arabic flipped pages { rightImages[i].setImageResource(R