Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - App has stopped after upgrade to android studio 3.0

I tried to make an app when I use android version 2.3.3. However, when I migrate to version 3.0, my application becomes "has stopped" in the emulator. How to solve this problem? I have updated sdk and gradle. I have made sure no updates are left that I have not done yet. Here is the error from logcat:

E/AndroidRuntime: FATAL EXCEPTION: main
                                                                        Process: com.martin.app.donorkuyadmin, PID: 3870
                                                                        java.lang.RuntimeException: Unable to start activity ComponentInfo{com.martin.app.donorkuyadmin/com.martin.app.donorkuyadmin.LoginActivity}: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class com.dd.CircularProgressButton
                                                                            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
                                                                            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
                                                                            at android.app.ActivityThread.-wrap12(ActivityThread.java)
                                                                            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
                                                                            at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                            at android.os.Looper.loop(Looper.java:154)
                                                                            at android.app.ActivityThread.main(ActivityThread.java:6077)
                                                                            at java.lang.reflect.Method.invoke(Native Method)
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
                                                                         Caused by: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class com.dd.CircularProgressButton
                                                                         Caused by: android.view.InflateException: Binary XML file line #0: Error inflating class com.dd.CircularProgressButton
                                                                         Caused by: java.lang.reflect.InvocationTargetException
                                                                            at java.lang.reflect.Constructor.newInstance0(Native Method)
                                                                            at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
                                                                            at android.view.LayoutInflater.createView(LayoutInflater.java:645)
                                                                            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
                                                                            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
                                                                            at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
                                                                            at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
                                                                            at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
                                                                            at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
                                                                            at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
                                                                            at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
                                                                            at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
                                                                            at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
                                                                            at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
                                                                            at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:414)
                                                                            at android.app.Activity.setContentView(Activity.java:2414)
                                                                            at com.martin.app.donorkuyadmin.LoginActivity.onCreate(LoginActivity.java:30)
                                                                            at android.app.Activity.performCreate(Activity.java:6662)
                                                                            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
                                                                            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
                                                                            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
                                                                            at android.app.ActivityThread.-wrap12(ActivityThread.java)
                                                                            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
                                                                            at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                            at android.os.Looper.loop(Looper.java:154)
                                                                            at android.app.ActivityThread.main(ActivityThread.java:6077)
                                                                            at java.lang.reflect.Method.invoke(Native Method)
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
                                                                         Caused by: java.lang.UnsupportedOperationException: Can't convert value at index 12 to dimension: type=0x3
                                                                            at android.content.res.TypedArray.getDimension(TypedArray.java:621)
                                                                            at com.dd.CircularProgressButton.initAttributes(CircularProgressButton.java:196)
                                                                            at com.dd.CircularProgressButton.init(CircularProgressButton.java:84)
                                                                            at com.dd.CircularProgressButton.<init>(CircularProgressButton.java:73)
                                                                            at java.lang.reflect.Constructor.newInstance0(Native Method) 
                                                                            at java.lang.reflect.Constructor.newInstance(Constructor.java:430) 
                                                                            at android.view.LayoutInflater.createView(LayoutInflater.java:645) 
                                                                            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) 
                                                                            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) 
                                                                            at android.view.LayoutInflater.rInflate(LayoutInflater.java:858) 
                                                                            at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) 
                                                                            at android.view.LayoutInflater.rInflate(LayoutInflater.java:861) 
                                                                            at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) 
                                                                            at android.view.LayoutInflater.rInflate(LayoutInflater.java:861) 
                                                                            at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) 
                                                                            at android.view.LayoutInflater.inflate(LayoutInflater.java:518) 
                                                                            at android.view.LayoutInflater.inflate(LayoutInflater.java:426) 
                                                                            at android.view.LayoutInflater.inflate(LayoutInflater.java:377) 
                                                                            at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:414) 
                                                                            at android.app.Activity.setContentView(Activity.java:2414) 
                                                                            at com.martin.app.donorkuyadmin.LoginActivity.onCreate(LoginActivity.java:30) 
                                                                            at android.app.Activity.performCreate(Activity.java:6662) 
                                                                            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) 
                                                                            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599) 
                                                                            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) 
                                                                            at android.app.ActivityThread.-wrap12(ActivityThread.java) 
                                                                            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) 
                                                                            at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                            at android.os.Looper.loop(Looper.java:154) 
                                                                            at android.app.ActivityThread.main(ActivityThread.java:6077) 
                                                                            at java.lang.reflect.Method.invoke(Native Method) 
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) 
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) 
like image 924
mrtn_24 Avatar asked Oct 27 '17 21:10

mrtn_24


People also ask

Why does my app keep stopping in Android Studio?

An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java or Kotlin crashes if it throws an unhandled exception, represented by the Throwable class.

Why Android Studio is not opening after installation?

If Studio doesn't start after an upgrade, the problem may be due to an invalid Android Studio configuration imported from a previous version of Android Studio or an incompatible plugin.


1 Answers

I had a same issue, looks like something is wrong when using dependence in gradle for this library in android studio 3.0, below steps worked for me.

  1. Remove dependence compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3' from gradle.
  2. Download the library and add it as project module. https://github.com/dmytrodanylyk/circular-progress-button

Steps to Import Module in Android Studio.

  1. Go to File -> New -> Import Module...
  2. Select the source directory of the Module you want to import and click Finish.
  3. Open Project Structure and open Module Settings for your project.
  4. Open the Dependencies tab.
  5. Click the (+) icon and select Module Dependency. Select the module and click Ok.
  6. Open your build.gradle file and check that the module is now listed under dependencies.
like image 165
Mayur Prasad Avatar answered Sep 27 '22 18:09

Mayur Prasad