inflate-exception

Error inflating class when trying to decodeStream

无人久伴 提交于 2019-12-02 15:08:44
问题 i'm exausted. I'm working on this all day. In my app i have 100 ImageViews, but i'm getting a java.outofmemory error so i decided to decode and resize file, but i can not manage it to work. Can someone take a look in the code and suggest me anything? MainActivity code: public class MainActivity extends Activity implements OnClickListener { ImageView display; int toPhone; private Context context; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

Error inflating class when trying to decodeStream

て烟熏妆下的殇ゞ 提交于 2019-12-02 09:59:54
i'm exausted. I'm working on this all day. In my app i have 100 ImageViews, but i'm getting a java.outofmemory error so i decided to decode and resize file, but i can not manage it to work. Can someone take a look in the code and suggest me anything? MainActivity code: public class MainActivity extends Activity implements OnClickListener { ImageView display; int toPhone; private Context context; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); System.gc(); context = this; toPhone = R.drawable.wal1;

Why is assigning an OnClickListener to AutoCompleteTextView giving a NullPointerException?

有些话、适合烂在心里 提交于 2019-12-02 05:04:06
Whenever I assign an android:onClick attribute to an AutoCompleteTextView, my application immediately crashes upon loading the activity. I've tested AutoCompleteTextView without assigning an onClick method and it seems to work fine, as does assigning onClick to other views (including EditText, Spinners, TextViews, Buttons and ImageButtons). I've managed to narrow down the error to specifically to line 24 (setContentView(R.layout.activity_main)). Can anyone shed some light on this? MainActivity.java package com.example.matt.testapp; import android.support.v7.app.AppCompatActivity; import

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

↘锁芯ラ 提交于 2019-12-01 22:59:15
问题 I am trying to use ToolBar (Lollipop Widget) using android.support.v7 library. But while running an app getting an error. android.view.InflateException: Binary XML file line #7: Error inflating class Toolbar My main goal is to have a navigation drawer using toolbar . This is the Layout file which i am using : <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/frame_container1" android:layout_width="match_parent" android:layout_height="match_parent" >

Google Map is not loading due to inflate exception

戏子无情 提交于 2019-12-01 13:01:24
问题 I am using Google Maps v2 in my application. The key is correctly generated, all the permissions exist in manifest. I followed the tutorial of Google Maps v2. I followed each and every step but it's not working. Please Help Log 03-04 01:25:23.145: E/Trace(19467): error opening trace file: No such file or directory (2) 03-04 01:25:23.293: E/AndroidRuntime(19467): FATAL EXCEPTION: main 03-04 01:25:23.293: E/AndroidRuntime(19467): java.lang.RuntimeException: Unable to start activity

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

五迷三道 提交于 2019-12-01 11:31:16
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 fileTree(dir: 'libs', include: ['*.jar']) compile files('libs/org.apache.commons.io.jar') compile files('libs

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

与世无争的帅哥 提交于 2019-11-30 15:57:44
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, AttributeSet attrs) { super(context, attrs); } public MyTextView(Context context) { super(context); }

Error inflating class EditText on creating TextInputLayout on Android 4.4.2:

折月煮酒 提交于 2019-11-30 11:41:47
I using the TextInputLayout UI mechanism in my login page of the application, everything works great except for device that run the 4.4.2 android version on this devices I have an exception. This is my layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"> <include android:id="@+id/loginInfiLogoRL" layout="@layout/login_infi_logo_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="-3dp" android:layout

NameNotFoundException webview

落爺英雄遲暮 提交于 2019-11-30 06:10:07
问题 I am getting errors from Crashlytics that indicates that some devices are missing com.google.android.webview. How is that even possible? java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp.app/com.myapp.ReaderActivity}: android.view.InflateException: Binary XML file line #29: Error inflating class com.myapp.MyWebView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360

Error inflating class EditText on creating TextInputLayout on Android 4.4.2:

我的梦境 提交于 2019-11-29 17:34:29
问题 I using the TextInputLayout UI mechanism in my login page of the application, everything works great except for device that run the 4.4.2 android version on this devices I have an exception. This is my layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"> <include android:id="@+id/loginInfiLogoRL" layout="@layout/login_infi_logo_layout" android:layout