Cannot find symbol symbol : variable PROXIMITY_ON_WAKE? - java

I'm trying to build a ROM for Android and everything is going smooth, but then i added Proximity Wake feature from CM and got this error:
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:148: cannot find symbol symbol :
variable advancedPrefs location: class com.android.settings.DisplaySettings
advancedPrefs.removePreference(findPreference(KEY_PROXIMITY_WAKE)); ^
packages/apps/Settings/src/com/android/settings/DisplaySettings.java:149: cannot find symbol symbol :
variable PROXIMITY_ON_WAKE location: class android.provider.Settings.System
Settings.System.putInt(getContentResolver(), Settings.System.PROXIMITY_ON_WAKE, 1);
^ Note: Some input files use or override a deprecated API. Note: Recompile
with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors
when i open up the file i find this lines:
advancedPrefs.removePreference(findPreference(KEY_PROXIMITY_WAKE));
Settings.System.putInt(getContentResolver(), Settings.System.PROXIMITY_ON_WAKE, 1);
The error states that it cannot find a symbol, what is wrong?

Related

after adding wallpaper manager package it showing :(

`
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\wallpaper_manager-1.0.10\android\src\main\java\com\mulgundkar\wallpaper_manager\WallpaperManagerPlugin.java:129: error: cannot find symbol
String assetLookupKey = FlutterLoader.getInstance().getLookupKeyForAsset(assetPath);
^
symbol: method getInstance()
location: class FlutterLoader
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\wallpaper_manager-1.0.10\android\src\main\java\com\mulgundkar\wallpaper_manager\WallpaperManagerPlugin.java:152: error: cannot find symbol
String assetLookupKey = FlutterLoader.getInstance().getLookupKeyForAsset(assetPath);
^
symbol: method getInstance()
location: class FlutterLoader
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':wallpaper_manager:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
`
wallpaper_manager: any
When I add the package, the project gives an error.
There was no problem in the old versions of flutter, but the application does not work anymore, how should I proceed?
If you look at the current javadocs for FlutterLoader, it doesn't declare a getInstance() method anymore. The method was deprecated and then removed.
According to https://stackoverflow.com/a/64456438/139985, since Flutter 1.22 you need to get hold of a FlutterLoader instance using FlutterInjector:
import io.flutter.FlutterInjector;
...
FlutterLoader loader = FlutterInjector.instance().flutterLoader();
See also: What does a "Cannot find symbol" or "Cannot resolve symbol" error mean?

Gauge Failed to start gauge API: Error occurred while waiting for runner process to finish

I'm quite new to gauge and have problems running a set of gauge tests. When I try to gauge run I get the following console output:
src\main\java\de\...\qa\Common.java:3: error: package com.github.....gauge.graphql does not exist
import com.github.....gauge.graphql.GraphqlSetup;
^
symbol: class VariableStorage
location: class Pricing
src\main\java\de\...\qa\testcraft\GaugeTestCraft.java:3: error: package com.github.....gauge.random.data does not exist
import com.github.....gauge.random.data.VariableStorage;
^
src\main\java\de\...\qa\testcraft\TestCraftExecutor.java:4: error: package org.tinylog does not exist
import org.tinylog.Logger;
^
src\test\java\de\...\qa\PricingTest.java:8: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.Test;
^
src\test\java\de\...\qa\PricingTest.java:9: error: package org.yaml.snakeyaml does not exist
import org.yaml.snakeyaml.Yaml;
^
src\test\java\de\...\qa\TestVariableStorage.java:3: error: package com.github.....gauge.random.data does not exist
import com.github.....gauge.random.data.VariableStorage;
^
src\test\java\de\...\qa\TestVariableStorage.java:9: error: cannot find symbol
public class TestVariableStorage implements VariableStorage {
^
symbol: class VariableStorage
src\test\java\de\...\qa\PricingTest.java:26: error: cannot find symbol
#Test
^
symbol: class Test
location: class PricingTest
src\test\java\de\...\qa\PricingTest.java:33: error: cannot find symbol
#Test
^
symbol: variable Logger
location: class TestCraftExecutor
src\test\java\de\...\qa\TestVariableStorage.java:12: error: method does not override or implement a method from a supertype
#Override
^
src\test\java\de\...\qa\TestVariableStorage.java:17: error: method does not override or implement a method from a supertype
#Override
^
src\test\java\de\...\qa\TestVariableStorage.java:22: error: method does not override or implement a method from a supertype
#Override
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
55 errors
Error occurred while waiting for runner process to finish.
Error : exit status 1
Error ----------------------------------
[Gauge]
Failed to start gauge API: Error occurred while waiting for runner process to finish.
Error : exit status 1
Get Support ----------------------------
Docs: https://docs.gauge.org
Bugs: https://github.com/getgauge/gauge/issues
Chat: https://spectrum.chat/gauge
Your Environment Information -----------
windows, 1.1.1, 6e0d83f
html-report (4.0.12), java (0.7.9), python (0.3.11), screenshot (0.0.1), xml-report (0.2.3)
Does someone know how this happens and how to solve it? Here are some additional informations:
Java version:14.0.2
Gauge version: 1.1.1
Maven version: 3.6.3
I just resolve the problem.
You should check your project's gauge.log. The Traceback is in the file, that will help you.
Don`t see the output, it will not work.

cannot find the symbol #Before in play2.2.1 java [duplicate]

This question already has an answer here:
Play 2.2.1 Java: Whats the equivalent of #before filters from play 1.X?
(1 answer)
Closed 8 years ago.
I am trying to use #Before interceptor in my controller
#Before(only = {"save" })
static void parseParams() {
String[] jobcategories = params.getAll("jobcategories");
for (int i = 0; i < jobcategories.length; i++) {
params.put("jobcategories[" + i + "].id", jobcategories[i]);
}
System.out.print(jobcategories);
}
but it gives me compile time error
C:\myapp\app\controllers\JobAdController.java:57: error: cannot find symbol
#Before(only={"save"})
^
symbol: class Before
location: class JobAdController
C:\myapp\app\controllers\JobAdController.java:59: error: cannot find symbol
String[] jobcategories = params.getAll("jobcategories");
^
symbol: variable params
location: class JobAdController
C:\myapp\app\controllers\JobAdController.java:61: error: cannot find symbol
params.put("jobcategories["+i+"].id",jobcategories[i]);
^
symbol: variable params
location: class JobAdController
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
(compile:compile) javac returned nonzero exit code
Total time: 30 s, completed Nov 20, 2014 1:05:18 PM
What am I missing?
You CAN'T find it as it's from Play 1.x API #Before and other interceptors are NOT available in Play 2.x - they are replaced by Action Composition
#See similar topic
Note: Do not use documentation of Play 1.x for Play 2.x at all. In most areas they are totally different.

Java: error: cannot find symbol javax.sound.sampled.DataLine.Info

I have a java applet (SetWatch.class) which I wish to modify. It only supports an offset of 30 minutes and I want 120. I'd like to parameterise the value eventually, but I'd settle for a hard code value as an interim step. I have decompiled it using the website www. showmycode. com. The class file and the resulting .java file are here:
http://www.edcint.co.nz/tmp/SetWatch/
I have programming skills but not java skills so I am unable to verify if the .java file looks good. So I before I modify it I thought I'd try and compile it.
I am running Fedora 19 and using java-1.7.0-openjdk.
I try a basic
javac SetWatch.java
Which gives:
SetWatch.java:65: error: cannot find symbol
javax.sound.sampled.DataLine.Info info = new javax.sound.sampled.DataLine.Info(javax/sound/sampled/SourceDataLine, audioformat);
^
symbol: variable javax
location: class SetWatch
SetWatch.java:65: error: cannot find symbol
javax.sound.sampled.DataLine.Info info = new javax.sound.sampled.DataLine.Info(javax/sound/sampled/SourceDataLine, audioformat);
^
symbol: variable sound
location: class SetWatch
SetWatch.java:65: error: cannot find symbol
javax.sound.sampled.DataLine.Info info = new javax.sound.sampled.DataLine.Info(javax/sound/sampled/SourceDataLine, audioformat);
^
symbol: variable sampled
location: class SetWatch
SetWatch.java:65: error: cannot find symbol
javax.sound.sampled.DataLine.Info info = new javax.sound.sampled.DataLine.Info(javax/sound/sampled/SourceDataLine, audioformat);
^
symbol: variable SourceDataLine
location: class SetWatch
4 errors
So I set about trying to find javax.sound.sampled.DataLine.Info.
I find javax/sound/sampled/DataLine$Info.class inside /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.0.fc19.i386/jre/lib/rt.jar. Close, maybe that will work?
javac -classpath /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.0.fc19.i386/jre/lib/rt.jar SetWatch.java
No. Same errors. So I try unzip /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.0.fc19.i386/jre/lib/rt.jar into /tmp (which does seem dodgy to me) and then try
javac -classpath /tmp/javax/sound/sampled SetWatch.java which gives different errors:
SetWatch.java:674: error: cannot access AudioFormat
AudioFormat audioformat;
^
bad class file: /tmp/javax/sound/sampled/AudioFormat.class
class file contains wrong class: javax.sound.sampled.AudioFormat
Please remove or make sure it appears in the correct subdirectory of the classpath.
This looks worse to me like it has sort of worked but caused other problems.
I know I only have javax/sound/sampled/DataLine$Info.class which is not exactly what I want. Where do I get javax.sound.sampled.DataLine.Info from?
I've grepped inside every file from the java RPMs looking for DataLine\.Info but I can not find it.
This is the problem when using a decompiler, you often get junk code in the resultant "source" file. The class literal argument has been mangled:
info =
new javax.sound.sampled.DataLine.Info(javax/sound/sampled/SourceDataLine,
audioformat);
^--------------------------------^
it should be
info =
new javax.sound.sampled.DataLine.Info(javax.sound.sampled.SourceDataLine.class,
audioformat);
Read: DataLine.Info javadoc

Akka - Deprecation Compile Errors

I've decided to tackle Akka... which was going great until compile time :-/ Running Ubuntu by the way.
What I've Done So Far:
Installed JRE and JDK 7
Downloaded/Extracted Akka
Downloaded and Setup Maven
Set up PATH variables etc
All following this tutorial Tutorial
When compiling, I'm getting the following errors
javac -cp lib/scala-library.jar:lib/akka/akka-actor_2.10-2.2.1.jar akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java -Xlint:deprecation
akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:8: warning: [deprecation] UntypedActorFactory in akka.actor has been deprecated
import akka.actor.UntypedActorFactory;
^
akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:10: error: cannot find symbol
import akka.util.Duration;
^
symbol: class Duration
location: package akka.util
akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:56: error: cannot find symbol
private final Duration duration;
^
symbol: class Duration
location: class PiApproximation
akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:58: error: cannot find symbol
public PiApproximation(double pi, Duration duration) {
^
symbol: class Duration
location: class PiApproximation
akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:67: error: cannot find symbol
public Duration getDuration() {
^
symbol: class Duration
location: class PiApproximation
akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:112: warning: [deprecation] Props(Class<? extends Actor>) in Props has been deprecated
workerRouter = this.getContext().actorOf(new Props(Worker.class).withRouter(new RoundRobinRouter(nrOfWorkers)),
^
akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:127: error: cannot find symbol
Duration duration = Duration.create(System.currentTimeMillis() - start, TimeUnit.MILLISECONDS);
^
symbol: class Duration
location: class Master
akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:127: error: cannot find symbol
Duration duration = Duration.create(System.currentTimeMillis() - start, TimeUnit.MILLISECONDS);
^
symbol: variable Duration
location: class Master
akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:158: warning: [deprecation] Props(Class<? extends Actor>) in Props has been deprecated
final ActorRef listener = system.actorOf(new Props(Listener.class), "listener");
^
akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:161: warning: [deprecation] UntypedActorFactory in akka.actor has been deprecated
ActorRef master = system.actorOf(new Props(new UntypedActorFactory() {
^
akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:161: warning: [deprecation] Props(UntypedActorFactory) in Props has been deprecated
ActorRef master = system.actorOf(new Props(new UntypedActorFactory() {
^
akka-tutorial-first-java/src/main/java/akka/tutorial/first/java/Pi.java:168: error: method tell in class ActorRef cannot be applied to given types;
master.tell(new Calculate());
^
required: Object,ActorRef<br/>
found: Calculate<br/>
reason: actual and formal argument lists differ in length<br/>
7 errors<br/>
5 warnings
I've literally copied ans pasted their final Pi.java file and tried to compile and i'm completely at a loss as how to proceed? :-(
Any ideas would be great.
The best way to get started with Akka is by using Typesafe’s Activator: there are several tutorials in there which show you how to do different things, starting from “Hello Akka” to using advanced Cluster features, you can see the full list here.
That said, your problems come from trying to run a tutorial from the 2.0.2 docs on Akka 2.2.1, which will not work.

Categories

Resources