android
App crashes on Window.java getContext()
I updated IntellijIDEA and now my app crashes everytime I open it, With the debug tool I can see the line where it stops, Window.Java class... public final Context getContext() { return mContext; } is in the return of that function, the object does not come null and i don't know why it crashes.. the return is called several times I counted like 50 or more and there is one loop where it crashes. this function is called from setContentView(R.layout.main); on the intializecomponents() of myActivity class this setContentView(R.layout.main); function calls inside the getContext() of the window.Java class public void setContentView(int layoutResID) { getWindow().setContentView(layoutResID); initActionBar(); } and again the error happens here.. in the return who is called a lot of times.. public final Context getContext() { return mContext; } UPDATE...... The problem was with the permissions in Main.Xml I don't know what is the correct way to set them here is what I have.. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <uses-permission android:name="android.permission.INTERNET" ></uses-permission> <uses-permission android:name="android.permission.WAKE_LOCK" ></uses-permission> <ImageView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="#+id/imageView" android:layout_gravity="left|center_vertical" android:src="#drawable/folder" android:contentDescription=""/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="#string/welcomeText" android:id="#+id/textView" android:layout_gravity="left|center_vertical" android:gravity="center_horizontal"/> </LinearLayout> Am I doing it Right?
Related Links
Show ImageView as long as the ImageView is pressed
popup window containing two views to make a call
FCM- doesnt get notification when app is swiped off from recent apps [duplicate]
Android: How to remove the spacing after the “1” digit in a TextView
How I can add StreetView in SUpportMapFragment?
Firebase Recycler Adapter always empty then shows up when I reload activity
Implement off line here map in android
Error if the Activity is having getActionbar(), when I am implementing TextInputLayout in one of Layout in android
Rotating and editing imageview and then passing the edited image to next activity
Opening issue regarding Android app with Api.ai
Continuously polling a NFC Tag
Set Programmatically scale and scrol (ImageView)
App needs to be restarted even when runtime permission for accessing files is granted using WRITE_EXTERNAL_STORAGE
Line Separator not working inside Scroll View Android
Android: Blue-Alliance ColorPicker. Does somebody know an example?
Gradle install error: Javadoc