Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 3.1 - Exception in plugin Android Support

I have updated to the latest version of Android Studio (3.1) and I get the following error when I try to run my app. It was working with no problems before the update. I have also uninstalled Android Studio and downloaded the latest version from the official website. Nothing has changed.

null java.lang.NullPointerException
        at com.android.tools.idea.run.tasks.InstantRunNotificationTask.<init>(InstantRunNotificationTask.java:64)
        at com.android.tools.idea.fd.InstantRunBuildAnalyzer.getNotificationTask(InstantRunBuildAnalyzer.java:188)
        at com.android.tools.idea.run.AndroidLaunchTasksProvider.getTasks(AndroidLaunchTasksProvider.java:122)
        at com.android.tools.idea.run.LaunchTaskRunner.run(LaunchTaskRunner.java:102)
        at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:713)
        at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
        at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:543)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
        at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:165)
        at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
like image 942
Octavian Catusanu Avatar asked Mar 27 '18 10:03

Octavian Catusanu


People also ask

What are Android exceptions?

An exception thrown by AppSearchSession or a subcomponent. BackingStoreException. Thrown to indicate that a preferences operation could not complete because of a failure in the backing store, or a failure to contact the backing store.

How do I use Android plugins?

From the menu bar, select Android Studio > Preferences. Under IDE Settings, click Plugins and then click Install plugin from disk. Navigate to the folder where you downloaded the plugin and double-click it. Restart Android Studio.


2 Answers

I was having a similar issue. In my case Android Studio deleted all the "android:id"s from layout files.

like image 100
einUsername Avatar answered Sep 23 '22 12:09

einUsername


I faced the exact same problem, I was afraid I broke something... I fixed it by cleaning and rebuilding the project (I had disabled instant run as suggested here before but I guess that was not necessary as I enabled it again after cleaning and rebuilding the project and worked just fine...).

Build -> Clean Project

Build -> Rebuild Project

I am not sure if rebuilding would be necessary, I did both steps and it worked fine, maybe just cleaning the project would have been sufficient.

Hope that helps!!

EDIT

Nice, one more thing. When I solved the problem depicted here I found another problem, when I clicked run the apk was not being created and I solved it with my answer on that other thread:

The APK file does not exist on disk

like image 31
Seven Avatar answered Sep 22 '22 12:09

Seven