Error:Internal error: (java.lang.ClassNotFoundException) com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index - android-studio-3.4

Android Studio 3.4.
Project SDK (Android API 19 Platform).
Not using FindBugs or SpotBugs.
Every attempt to build, I get this error:
Information:9/05/2019 4:02 PM - Compilation completed with 1 error and 0 warnings in 1 s 763 ms
Error:Internal error: (java.lang.ClassNotFoundException) com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index
java.lang.ClassNotFoundException: com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.intellij.util.indexing.counters.IndexCounters.<clinit>(IndexCounters.java:34)
at com.intellij.util.indexing.impl.MapReduceIndex.<init>(MapReduceIndex.java:86)
at org.jetbrains.jps.backwardRefs.index.CompilerReferenceIndex$CompilerMapReduceIndex.<init>(CompilerReferenceIndex.java:214)
at org.jetbrains.jps.backwardRefs.index.CompilerReferenceIndex.<init>(CompilerReferenceIndex.java:73)
at org.jetbrains.jps.backwardRefs.JavaCompilerBackwardReferenceIndex.<init>(JavaCompilerBackwardReferenceIndex.java:12)
at org.jetbrains.jps.backwardRefs.JavaBackwardReferenceIndexWriter.initialize(JavaBackwardReferenceIndexWriter.java:74)
at org.jetbrains.jps.backwardRefs.JavaBackwardReferenceIndexBuilder.buildStarted(JavaBackwardReferenceIndexBuilder.java:40)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:358)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:178)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:302)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:135)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:229)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
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)

Solved for me, finally, after months. Note that I have never used FindBugs or SpotBugs, although most posts related to this error mention it.
The solution is to change the compiler from javac to Eclipse. I followed the picture here (don't worry if you don't read Chinese; you won't need to; the picture just makes it clear how to change the compiler).
I have no idea why this works and would highly appreciate informed commentary.

I am facing the same issue with android studio 3.4 and 3.4.1 as well but this work fine with android studio 2.3.3 and 3.0 as well.

Bug seems to be in Android Studio 3.4.x so I downloaded beta version of Android Studio 3.5 and error is gone.
You can download preview version from here :
https://developer.android.com/studio/preview/index.html

Partial and temporary fix.
I downgraded Android Studio to 2.3.3 (!) and it worked. I will need to track down what is hard-linking the project to this particular version and fix that, but I need to ship a fix now for the issue at hand.

I get this error message in a Flutter project, when I try to build the project (menu Build/Make Module) whith Android Studio 3.4.2. But I don't get the error when I run the app (menu Run/Run). Running the app does build the project correctly. It seems that menu Build/Make module does not build the app correctly...
So, the solution for me is to run the app, not build it ;-)

Solution
I was able to fix this problem by deleting the system subfolder in Android Studio's configuration folder. No user data is lost and the build starts working again!
Android Studio configuration folder can be found under this locations (for more information see this question):
Linux / MacOSX: /home/USERNAME/.AndroidStudio
Windows: C:/Users/USERNAME/.AndroidStudio
Note that the name of the configuration folder can vary based on the version: it could be .AndroidStudio3.5, .AndroidStudioBeta or others.
Cause
This problem is most probably caused by some corrupted/invalid gradle build files in your project, that cause the system-wide Android Studio configuration to break. So if the problem shows up again after using the solution above, remove cache and build files generated by gradle by following these steps:
./gradlew clean (Linux/MacOS) or .\gradlew.bat clean (Windows): this should work, as it should clean all files generated by gradle.
If you are in a git repository try to remove all untracked files (but please note that this could delete files you want to keep... be sure to commit them first!)
Manually delete build folders, in case the above steps did not work.

Related

Xcode 9.4 : unexpected service error: The Xcode build system has crashed

I’m getting strange error while building project in Xcode 9.4
Build system information - unexpected service error: The Xcode build system has crashed. Please close and reopen your workspace.
I tried Xcode quit and reopen but that didn’t worked. Any solution?
Please clear derived data folder (located at ~/Library/Developer/Xcode/DerivedData) and restart the Xcode project.
This error usually happens between Xcode major versions. Apple usually claim their new build system is ** times faster than their previous version. If you see this error(I see this on changing Xcode9 to Xcode10 beta), you can always change it to the legacy build system. Here is how you can do this:
Open 'workspace settings'( it is now changed to 'Project Settings' if you are using Xcode10 or later) in the File Menu
Change build system to 'legacy'
Update for Xcode 13.4.1:
I had this infamous bug today as well. I tried a lot including clean project, delete derived, restart max etc.
What did the fix finally is similar to the answer of kakaiikaka: I set the workspace settings to "Legacy Build System (Deprecated)" for both, the shared and per user workspace. I tried to build with this, but got an error because I had packages wich are not supported.
Restarted Xcode, then changed back the build system. Restarted Xcode again.
Now the crash doesn't happen any more.
Looks like something internal was spoilt and cycling the build system fixed it.
I moved a lot of files all at once between folders, including nested folders. This error started happening. Nothing I did in regards to cleaning, purging derived data, or undoing the move operation would help.
What I did to help was: restore the previous version of the project file from source control and then re-add all the applicable new files to it. It was project file related. Deleting user data inside the project container did not help in my case. So as long as you use source control and can rollback the .xcodeproj, this may be an option.
it happened to me when i changed build configuration names. After deleting Pods folder and Podfile.lock, and then runnnig "pod install" fixed the issue.
For Xcode 10.2 delete podfile, podfile.lock, xcworkspace, open terminal, cd directory of project, pod init, add pods you want to pod file, pod install, open xcworkspac. Everything will be indexing now and then you can build.

Problems deploying SecureInput MS Edge Extension native messaging sample

I am trying out SecureInput extension sample that demonstrates NativeMessaging capabilities in MS Edge browser extensions and I running into problems deploying the extension after building using VS community edition 2017. I don’t have Universal Windows Platform Apps development experience, so I apologize if there is a pretty obvious answer I am not aware of. But following readme.md in the sample doesn’t work, so posting this question here...
https://github.com/MicrosoftEdge/MicrosoftEdge-Extensions-Demos/tree/master/SecureInput
Steps followed…
Turned on developer mode in “Use Developer Features”
Turned on Enable extension developer features in Edge browser’s about:flags.
Downloaded the sample as a zip file to the local machine.
Copied SecureInput.html to my local webserver
Loaded SecureInput.sln in VS
community edition 2017 Out of two options.. InProc or OutOfProc, I
wanted to try InProc. So needed to select Project in
NativeMessagingHostInProcess in Build Configuration manager. Other
settings used... Debug - configuration; Any CPU – Active solution
platform; NativeMessagingHostInProcess – x64 project platform as I
was using 64 bit Windows and edge running as a 64 bit process as
well; Left rest as default.
With Debug Configuration and Any CPU Solution platform built the entire solution.
Deployment Summary
Built Entire SecureInput solution.
Installed AppX package by running
Add-AppxPackage -register [PathtoSecureInputSolutionFolder] NativeMessagingHostInProcess\bin\x64\Debug\AppxManifest.xml
No errors during building or while running Add-AppXPackage from elevated Power shell prompt.
Expected: At this point EdgeBrowser->MoreOptions->Extensions should list extension installed by AppX package (Deployment Summary/Step 2). =>> Doesn’t happen.
Few other details
I am using 64 bit Win 10 creators build (1703 – OS build 16063.128)
I am suspecting Add-AppxPackage failed to add the extension silently. Verbose flag doesn’t give me any clues either.
Get-AppXPackage shows newly added AppX package.
Name : ae24a957-5239-43b2-a36c-b96805a58ade
Publisher : CN=msft
Architecture : X64
ResourceId :
Version : 1.0.0.0
PackageFullName : ae24a957-5239-43b2-a36c-b96805a58ade_1.0.0.0_x64__2yx4q2bk84nj4
InstallLocation : [PathtoSecureInputSolutionFolder] \NativeMessagingHostInProcess\bin\x64\Debug
IsFramework : False
PackageFamilyName : ae24a957-5239-43b2-a36c-b96805a58ade_2yx4q2bk84nj4 PublisherId : 2yx4q2bk84nj4
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : True
IsPartiallyStaged : False
I would like to know if anyone got this sample working. If Microsoft Edge folks are monitoring stackoverflow, I really appreciate if someone can jump in to help your early adopters like me. :-)
With offline help from Chee Chen, we were able to figure out why SecureInput was not working. My sincere thanks to him for going out of his way to help. In my specific case, here are the things that went wrong.
URL manifest.json gives permissions to is case sensitive. I had a typo when I first entered the URL in edge browser very first time.. I typed in as SecureInput.html. Try cleaning the cache if you see that using lower case secureinput.html doesn't help.
When instructions didn't work right first time, I used Add-AppxPackage way of deploying the Extension. While doing that, I picked AppxManifest file in NativeMessagingHostInProcess\bin\x64\Debug\AppxManifest.xml instead of NativeMessagingHostInProcess\bin\x64\Debug\AppX\AppxManifest.xml. Something to watch out for and if you make the same mistake, make sure you uninstall the appx package completely and start all over again.
So here are my supplemental instructions for others trying the sample :-)
Make sure you selected right Platform as per your target test machine. Edge runs as 64 bit process so your extension needs to be targeted at that platform.
Make sure right AppServiceName is selected in PasswordInputProtection->Program.cs and Extension->background.js
I think PasswordInputProtection.csproj has a hardcoded Program files (x86) in its path, which will break if you try the sample on 32 bit machine. Edit the project file in notepad and fix it before you try.
Ensure NativeMessagingHost project's Output paths are correctly configured... It needs to be "bin\[Platform]\[Configuration]\AppX\" and not "bin\[Platform]\[Configuration]\"
Avoid typos if you can, because I see very little feedback or verbose logs on why things are not working.
Have you tried following the deployment steps in the documentation? The actual steps and ordering is important:
Build and deploy the NativeMessagingHostinProcess UWP app.
This will generate:
Necessary binaries and files needed for the UWP app.
The AppX folder.
The AppXManifest.xml based on the content of package.manifest. (The content of package.manifest in this sample has been edited to include the necessary entries for Edge extensions).
Build the PasswordInputProtection Desktop Bridge.
This will:
Build the binaries for this project
Trigger a post-build event that will copy the output of the exe to the AppX folder and copy the Extension folder to the AppX folder.
Now that the files are all ready to go, you will need to register the AppX.
There are two ways to accomplish this:
Run Add-AppxPackage from PowerShell: Add-AppxPackage -register [Path to AppX folder]\AppxManifest.xml
OR
Deploy the NativeMessagingHostInProcess project. Visual Studio will run the same PowerShell script to register the AppX from the folder.

I get this Missing or bad plugin while running sonar-runner on a C project

I'm trying to analyze a example project which was provided by the sonarQube examples. I have this C/C++ version 2.0 plugin installed on my SonarQube.
My sonar-project.properties has these contents.
sonar-project.properties
sonar.projectKey=org.codehaus.sonar:simple-c-project
sonar.projectName=Simple C project analyzed with the SonarQube Runner
sonar.projectVersion=1.0
sonar.sources=src
sonar.language=c
sonar.sourceEncoding=UTF-8
When i run the sonar-runner command for this project i get an error as given below
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Caused by: com.A.A.A.B.A: Missing or bad plugin license. Please check logs.
Am i missing any plugins or is the plugin installed not proper.
Thank You.
Alternatively you can use another plugin in sonar called sonar-cxx if you don't want to use the commercial plugin. Its community edition Plugin. You can find it Here- https://github.com/wenns/sonar-cxx/wiki/Installation
You can download it from here - https://github.com/wenns/sonar-cxx/releases/tag/cxx-0.9.1
The C/C++ plugin is a commercial plugin, which requires a purchased licenses. I suspect the problem is that it can't find your licenses.
According to the official instructions, you need to do this:
Log in as a System administrator, go to Settings > General Settings > Licenses, paste your license key and Save (was Settings > General Settings > C/C++ (SonarSource) prior to version 1.6).

unable to deploy after upgrading to 1.7.4

I upgraded today to GAE 1.7.4 and on trying to deploy I see following error:
Preparing to deploy:
Created staging directory at: 'C:\Users\VSKUMA~1.ST-\AppData\Local\Temp\appcfg4811921061542689032.tmp'
Scanning for jsp files.
Compiling jsp files.
java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
I already have JDK pointing in the build path and this all was working fine till GAE 1.7.3
I cannot uninstall the existing GREs for some reasons.
For me at least, forcing Eclipse to use a different vm itself worked. Add, for example:
-vm
C:\Program Files\Java\<jdk1.6.0_38>\bin\javaw.exe
to the first two lines* of the eclipse.ini file and restart Eclipse.
*Thanks to Andre
finally i uninstalled jre manually and this only helped me to get through this
Yes #Vik, i had this problem when updating to GAE 1.7.3 and the solution to the problem is to reinstall the JRE... but! if you are working with Eclipse, and this doesn´t work either, try reintalling the whole IDE. (i had to do so, and it worked for me ¬¬ )

Error while starting a GAE/GWT project: Unable to restore the previous TimeZone

When I try to run a GWT App Engine project using the Eclipse plugin, I get the following error:
Initializing App Engine server
[ERROR] Unable to start App Engine server
java.lang.RuntimeException: Unable to restore the previous TimeZone
at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:228)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:164)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Caused by: java.lang.NoSuchFieldException: defaultZoneTL
at java.lang.Class.getDeclaredField(Class.java:1899)
at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:222)
... 6 more
[ERROR] shell failed in doStartupServer method
Unable to start embedded HTTP server
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:102)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Chris Cashwell provided the correct answer. But for people like myself who are relatively new to Eclipse, here are more explicit instructions (which I came across here):
Right-click project directory in Project Explorer window
Select Run As > Run Configurations...
Go to Arguments tab
In VM Arguments textbox, add one of the following parameters mentioned by Chris:
-Dappengine.user.timezone.impl=UTC (this worked in my case)
-Dappengine.user.timezone=UTC
Click Apply then Run
In my case, this was done specifically in the context of a PlayN project I am working on, so I was right-clicking the HTML folder. In the end, my VM arguments looked something like this:
-Xmx512m -javaagent:/long/path/to/appengine-agent.jar -Dappengine.user.timezone.impl=UTC
See this bug report. For me, it was fixed by downgrading the JDK from 1.7.0_03 -> 1.7.0_02. Other things that have been purported to work are adding -Dappengine.user.timezone=UTC (or in some cases -Dappengine.user.timezone.impl=UTC) to the JVM flags.
i got this error, and found port already in use in the console.
I closed eclipse and killed javaw.exe. Then everything worked fine.

Resources