.setBackgroundResource(0) crashing my app












0















In app, I allocate resources to button in GridLayout.



if(fill[tappedButtonLocation] == 2 && !gameOver) {
fill[tappedButtonLocation] = activePlayer;
if (activePlayer == 0) {
tappedButton.setBackgroundResource(R.drawable.circle_yellow);
activePlayer = 1;
} else {
tappedButton.setBackgroundResource(R.drawable.circle_yelp);
activePlayer = 0;
}
}


Then I want to remove the resources but it crash the app.



    GridLayout gridLayout = findViewById(R.id.gridLayout);
for(int i=0; i<gridLayout.getChildCount();i++){
((Button) gridLayout.getChildAt(i)).setBackgroundResource(0);
}


Allocated resource is



<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#FFFC00"> </solid>
<size android:height="120dp"
android:width="120dp"> </size>
</shape>


Logcat Error:



java.lang.IllegalStateException: Could not execute method for android:onClick
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:390)
at android.view.View.performClick(View.java:6597)
at android.view.View.performClickInternal(View.java:6574)
at android.view.View.access$3100(View.java:778)
at android.view.View$PerformClick.run(View.java:25885)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:385)
at android.view.View.performClick(View.java:6597) 
at android.view.View.performClickInternal(View.java:6574) 
at android.view.View.access$3100(View.java:778) 
at android.view.View$PerformClick.run(View.java:25885) 
at android.os.Handler.handleCallback(Handler.java:873) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6669) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
Caused by: java.lang.ClassCastException: android.support.v7.widget.GridLayout cannot be cast to android.widget.GridLayout
at com.example.tictokgame.MainActivity.playAgain(MainActivity.java:65)
at java.lang.reflect.Method.invoke(Native Method) 
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:385) 
at android.view.View.performClick(View.java:6597) 
at android.view.View.performClickInternal(View.java:6574) 
at android.view.View.access$3100(View.java:778) 
at android.view.View$PerformClick.run(View.java:25885) 
at android.os.Handler.handleCallback(Handler.java:873) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6669) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 


How can I remove the resource from GridView.
Actually I want to reset the tic-toc-toe game after clicking on play again button.










share|improve this question









New contributor




Abdullah Khan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • what's the crash? is there a stack trace?

    – nandsito
    2 days ago











  • Question is updated.

    – Abdullah Khan
    yesterday
















0















In app, I allocate resources to button in GridLayout.



if(fill[tappedButtonLocation] == 2 && !gameOver) {
fill[tappedButtonLocation] = activePlayer;
if (activePlayer == 0) {
tappedButton.setBackgroundResource(R.drawable.circle_yellow);
activePlayer = 1;
} else {
tappedButton.setBackgroundResource(R.drawable.circle_yelp);
activePlayer = 0;
}
}


Then I want to remove the resources but it crash the app.



    GridLayout gridLayout = findViewById(R.id.gridLayout);
for(int i=0; i<gridLayout.getChildCount();i++){
((Button) gridLayout.getChildAt(i)).setBackgroundResource(0);
}


Allocated resource is



<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#FFFC00"> </solid>
<size android:height="120dp"
android:width="120dp"> </size>
</shape>


Logcat Error:



java.lang.IllegalStateException: Could not execute method for android:onClick
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:390)
at android.view.View.performClick(View.java:6597)
at android.view.View.performClickInternal(View.java:6574)
at android.view.View.access$3100(View.java:778)
at android.view.View$PerformClick.run(View.java:25885)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:385)
at android.view.View.performClick(View.java:6597) 
at android.view.View.performClickInternal(View.java:6574) 
at android.view.View.access$3100(View.java:778) 
at android.view.View$PerformClick.run(View.java:25885) 
at android.os.Handler.handleCallback(Handler.java:873) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6669) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
Caused by: java.lang.ClassCastException: android.support.v7.widget.GridLayout cannot be cast to android.widget.GridLayout
at com.example.tictokgame.MainActivity.playAgain(MainActivity.java:65)
at java.lang.reflect.Method.invoke(Native Method) 
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:385) 
at android.view.View.performClick(View.java:6597) 
at android.view.View.performClickInternal(View.java:6574) 
at android.view.View.access$3100(View.java:778) 
at android.view.View$PerformClick.run(View.java:25885) 
at android.os.Handler.handleCallback(Handler.java:873) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6669) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 


How can I remove the resource from GridView.
Actually I want to reset the tic-toc-toe game after clicking on play again button.










share|improve this question









New contributor




Abdullah Khan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • what's the crash? is there a stack trace?

    – nandsito
    2 days ago











  • Question is updated.

    – Abdullah Khan
    yesterday














0












0








0








In app, I allocate resources to button in GridLayout.



if(fill[tappedButtonLocation] == 2 && !gameOver) {
fill[tappedButtonLocation] = activePlayer;
if (activePlayer == 0) {
tappedButton.setBackgroundResource(R.drawable.circle_yellow);
activePlayer = 1;
} else {
tappedButton.setBackgroundResource(R.drawable.circle_yelp);
activePlayer = 0;
}
}


Then I want to remove the resources but it crash the app.



    GridLayout gridLayout = findViewById(R.id.gridLayout);
for(int i=0; i<gridLayout.getChildCount();i++){
((Button) gridLayout.getChildAt(i)).setBackgroundResource(0);
}


Allocated resource is



<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#FFFC00"> </solid>
<size android:height="120dp"
android:width="120dp"> </size>
</shape>


Logcat Error:



java.lang.IllegalStateException: Could not execute method for android:onClick
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:390)
at android.view.View.performClick(View.java:6597)
at android.view.View.performClickInternal(View.java:6574)
at android.view.View.access$3100(View.java:778)
at android.view.View$PerformClick.run(View.java:25885)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:385)
at android.view.View.performClick(View.java:6597) 
at android.view.View.performClickInternal(View.java:6574) 
at android.view.View.access$3100(View.java:778) 
at android.view.View$PerformClick.run(View.java:25885) 
at android.os.Handler.handleCallback(Handler.java:873) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6669) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
Caused by: java.lang.ClassCastException: android.support.v7.widget.GridLayout cannot be cast to android.widget.GridLayout
at com.example.tictokgame.MainActivity.playAgain(MainActivity.java:65)
at java.lang.reflect.Method.invoke(Native Method) 
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:385) 
at android.view.View.performClick(View.java:6597) 
at android.view.View.performClickInternal(View.java:6574) 
at android.view.View.access$3100(View.java:778) 
at android.view.View$PerformClick.run(View.java:25885) 
at android.os.Handler.handleCallback(Handler.java:873) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6669) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 


How can I remove the resource from GridView.
Actually I want to reset the tic-toc-toe game after clicking on play again button.










share|improve this question









New contributor




Abdullah Khan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












In app, I allocate resources to button in GridLayout.



if(fill[tappedButtonLocation] == 2 && !gameOver) {
fill[tappedButtonLocation] = activePlayer;
if (activePlayer == 0) {
tappedButton.setBackgroundResource(R.drawable.circle_yellow);
activePlayer = 1;
} else {
tappedButton.setBackgroundResource(R.drawable.circle_yelp);
activePlayer = 0;
}
}


Then I want to remove the resources but it crash the app.



    GridLayout gridLayout = findViewById(R.id.gridLayout);
for(int i=0; i<gridLayout.getChildCount();i++){
((Button) gridLayout.getChildAt(i)).setBackgroundResource(0);
}


Allocated resource is



<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#FFFC00"> </solid>
<size android:height="120dp"
android:width="120dp"> </size>
</shape>


Logcat Error:



java.lang.IllegalStateException: Could not execute method for android:onClick
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:390)
at android.view.View.performClick(View.java:6597)
at android.view.View.performClickInternal(View.java:6574)
at android.view.View.access$3100(View.java:778)
at android.view.View$PerformClick.run(View.java:25885)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:385)
at android.view.View.performClick(View.java:6597) 
at android.view.View.performClickInternal(View.java:6574) 
at android.view.View.access$3100(View.java:778) 
at android.view.View$PerformClick.run(View.java:25885) 
at android.os.Handler.handleCallback(Handler.java:873) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6669) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
Caused by: java.lang.ClassCastException: android.support.v7.widget.GridLayout cannot be cast to android.widget.GridLayout
at com.example.tictokgame.MainActivity.playAgain(MainActivity.java:65)
at java.lang.reflect.Method.invoke(Native Method) 
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:385) 
at android.view.View.performClick(View.java:6597) 
at android.view.View.performClickInternal(View.java:6574) 
at android.view.View.access$3100(View.java:778) 
at android.view.View$PerformClick.run(View.java:25885) 
at android.os.Handler.handleCallback(Handler.java:873) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6669) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 


How can I remove the resource from GridView.
Actually I want to reset the tic-toc-toe game after clicking on play again button.







java android android-layout






share|improve this question









New contributor




Abdullah Khan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Abdullah Khan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









Zoe

11.4k74078




11.4k74078






New contributor




Abdullah Khan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









Abdullah KhanAbdullah Khan

113




113




New contributor




Abdullah Khan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Abdullah Khan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Abdullah Khan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • what's the crash? is there a stack trace?

    – nandsito
    2 days ago











  • Question is updated.

    – Abdullah Khan
    yesterday



















  • what's the crash? is there a stack trace?

    – nandsito
    2 days ago











  • Question is updated.

    – Abdullah Khan
    yesterday

















what's the crash? is there a stack trace?

– nandsito
2 days ago





what's the crash? is there a stack trace?

– nandsito
2 days ago













Question is updated.

– Abdullah Khan
yesterday





Question is updated.

– Abdullah Khan
yesterday












1 Answer
1






active

oldest

votes


















3














The problem seems to be a ClassCastException as noted in the stacktrace:



Caused by: java.lang.ClassCastException: android.support.v7.widget.GridLayout cannot be cast to android.widget.GridLayout


Please check your imports in the class, where you do the following:



GridLayout gridLayout = findViewById(R.id.gridLayout);


Change this:



import android.widget.GridLayout;


to:



import android.support.v7.widget.GridLayout;





share|improve this answer
























  • Thant's work but it's remove default background to. I want to restore the default background color of button.

    – Abdullah Khan
    yesterday











  • Im not quite sure but you can try this: setBackgroundResource(android.R.drawable.btn_default)

    – kAliert
    yesterday











  • Thanks. that work

    – Abdullah Khan
    yesterday













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Abdullah Khan is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54241832%2fsetbackgroundresource0-crashing-my-app%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














The problem seems to be a ClassCastException as noted in the stacktrace:



Caused by: java.lang.ClassCastException: android.support.v7.widget.GridLayout cannot be cast to android.widget.GridLayout


Please check your imports in the class, where you do the following:



GridLayout gridLayout = findViewById(R.id.gridLayout);


Change this:



import android.widget.GridLayout;


to:



import android.support.v7.widget.GridLayout;





share|improve this answer
























  • Thant's work but it's remove default background to. I want to restore the default background color of button.

    – Abdullah Khan
    yesterday











  • Im not quite sure but you can try this: setBackgroundResource(android.R.drawable.btn_default)

    – kAliert
    yesterday











  • Thanks. that work

    – Abdullah Khan
    yesterday


















3














The problem seems to be a ClassCastException as noted in the stacktrace:



Caused by: java.lang.ClassCastException: android.support.v7.widget.GridLayout cannot be cast to android.widget.GridLayout


Please check your imports in the class, where you do the following:



GridLayout gridLayout = findViewById(R.id.gridLayout);


Change this:



import android.widget.GridLayout;


to:



import android.support.v7.widget.GridLayout;





share|improve this answer
























  • Thant's work but it's remove default background to. I want to restore the default background color of button.

    – Abdullah Khan
    yesterday











  • Im not quite sure but you can try this: setBackgroundResource(android.R.drawable.btn_default)

    – kAliert
    yesterday











  • Thanks. that work

    – Abdullah Khan
    yesterday
















3












3








3







The problem seems to be a ClassCastException as noted in the stacktrace:



Caused by: java.lang.ClassCastException: android.support.v7.widget.GridLayout cannot be cast to android.widget.GridLayout


Please check your imports in the class, where you do the following:



GridLayout gridLayout = findViewById(R.id.gridLayout);


Change this:



import android.widget.GridLayout;


to:



import android.support.v7.widget.GridLayout;





share|improve this answer













The problem seems to be a ClassCastException as noted in the stacktrace:



Caused by: java.lang.ClassCastException: android.support.v7.widget.GridLayout cannot be cast to android.widget.GridLayout


Please check your imports in the class, where you do the following:



GridLayout gridLayout = findViewById(R.id.gridLayout);


Change this:



import android.widget.GridLayout;


to:



import android.support.v7.widget.GridLayout;






share|improve this answer












share|improve this answer



share|improve this answer










answered yesterday









kAliertkAliert

310210




310210













  • Thant's work but it's remove default background to. I want to restore the default background color of button.

    – Abdullah Khan
    yesterday











  • Im not quite sure but you can try this: setBackgroundResource(android.R.drawable.btn_default)

    – kAliert
    yesterday











  • Thanks. that work

    – Abdullah Khan
    yesterday





















  • Thant's work but it's remove default background to. I want to restore the default background color of button.

    – Abdullah Khan
    yesterday











  • Im not quite sure but you can try this: setBackgroundResource(android.R.drawable.btn_default)

    – kAliert
    yesterday











  • Thanks. that work

    – Abdullah Khan
    yesterday



















Thant's work but it's remove default background to. I want to restore the default background color of button.

– Abdullah Khan
yesterday





Thant's work but it's remove default background to. I want to restore the default background color of button.

– Abdullah Khan
yesterday













Im not quite sure but you can try this: setBackgroundResource(android.R.drawable.btn_default)

– kAliert
yesterday





Im not quite sure but you can try this: setBackgroundResource(android.R.drawable.btn_default)

– kAliert
yesterday













Thanks. that work

– Abdullah Khan
yesterday







Thanks. that work

– Abdullah Khan
yesterday












Abdullah Khan is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Abdullah Khan is a new contributor. Be nice, and check out our Code of Conduct.













Abdullah Khan is a new contributor. Be nice, and check out our Code of Conduct.












Abdullah Khan is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54241832%2fsetbackgroundresource0-crashing-my-app%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Homophylophilia

Updating UILabel text programmatically using a function

Cloud Functions - OpenCV Videocapture Read method fails for larger files from cloud storage