Há alguns dias atrás, o Android Studio indicou que tinha atualizações que estavam disponíveis...
Eu já havia terminado um aplicativo há algum tempo e ele estava pronto para ser publicado e talz, só faltava a licença da Google Play que eu precisava comprar.
Comprei a licença e voltei ao Android Studio para implementar anúncios (adMob) e gerar a key.
Fui inventar de implementar a atualização do build gradle (era "opcional") no app e imediatamente o mesmo parou de funcionar...
Então eu estava refazendo-o até que precisei adicionar backgrounds aos buttons do aplicativo, assim como fiz no outro e por algum motivo o app não inicia e nenhum erro é acusado além desse:
07-01 23:40:09.925 6690-6690/genesysgeneration.ruleoftree E/AndroidRuntime: FATAL EXCEPTION: main
Process: genesysgeneration.ruleoftree, PID: 6690
java.lang.RuntimeException: Canvas: trying to draw too large(146963896bytes) bitmap.
at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:260)
at android.graphics.Canvas.drawBitmap(Canvas.java:1415)
at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:528)
at android.view.View.getDrawableRenderNode(View.java:17428)
at android.view.View.drawBackground(View.java:17364)
at android.view.View.draw(View.java:17176)
at android.view.View.updateDisplayListIfDirty(View.java:16167)
at android.view.View.draw(View.java:16951)
at android.view.ViewGroup.drawChild(ViewGroup.java:3727)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3513)
at android.view.View.draw(View.java:17188)
at android.view.View.updateDisplayListIfDirty(View.java:16167)
at android.view.View.draw(View.java:16951)
at android.view.ViewGroup.drawChild(ViewGroup.java:3727)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3513)
at android.view.View.updateDisplayListIfDirty(View.java:16162)
at android.view.View.draw(View.java:16951)
at android.view.ViewGroup.drawChild(ViewGroup.java:3727)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3513)
at android.view.View.updateDisplayListIfDirty(View.java:16162)
at android.view.View.draw(View.java:16951)
at android.view.ViewGroup.drawChild(ViewGroup.java:3727)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3513)
at android.view.View.updateDisplayListIfDirty(View.java:16162)
at android.view.View.draw(View.java:16951)
at android.view.ViewGroup.drawChild(ViewGroup.java:3727)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3513)
at android.view.View.updateDisplayListIfDirty(View.java:16162)
at android.view.View.draw(View.java:16951)
at android.view.ViewGroup.drawChild(ViewGroup.java:3727)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3513)
at android.view.View.draw(View.java:17188)
at com.android.internal.policy.DecorView.draw(DecorView.java:753)
at android.view.View.updateDisplayListIfDirty(View.java:16167)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:648)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:654)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:762)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2800)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2608)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2215)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
at android.view.Choreographer.doCallbacks(Choreographer.java:686)
at android.view.Choreographer.doFrame(Choreographer.java:621)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Sem a implementação dos backgrounds o mesmo funciona, é adicionar qualquer imagem e ele não funciona mais.
Parte do código da activity:
package genesysgeneration.ruleoftree;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.squareup.picasso.Picasso;
public class MainActivity01 extends AppCompatActivity implements View.OnClickListener{
private EditText et01, et02, et03;
private TextView tv01/*, tvTest*/;
private double l01, l02, l03, equalizer, lxx;
private ImageView btnChange01, btnCompras, btnMoeda, btnInfo;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main01);
tv01=(TextView)findViewById(R.id.tv01);
tv01.setText(String.valueOf(0));
l01=0;
l02=0;
l03=0;
lxx=0;
et01=(EditText)findViewById(R.id.et01);
et02=(EditText)findViewById(R.id.et02);
et03=(EditText)findViewById(R.id.et03);
addValuesDouble();
btnChange01=(ImageView)findViewById(R.id.btnChange01);
Picasso.with().load(R.drawable.setas_03).into(btnChange01);
btnChange01.setOnClickListener(this);
btnCompras=(ImageView)findViewById(R.id.btnCompras);
btnCompras.setOnClickListener(this);
btnMoeda=(ImageView)findViewById(R.id.btnMoeda);
btnMoeda.setOnClickListener(this);
btnInfo=(ImageView)findViewById(R.id.btnInfo);
btnInfo.setOnClickListener(this);
}
}