Am trying to include GCM as native bundle. This runs as a background service but i cant get the build to compile successfully. I have android.playService.gcm=true as build hint. But i get the folliwng errors. It seems nothing in com.google.android.gms is being picked up. I have also enabled gradle build.
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaInstanceIDListenerService.java:15: error: package com.google.android.gms.iid does not exist
import com.google.android.gms.iid.InstanceID;
^
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaInstanceIDListenerService.java:16: error: package com.google.android.gms.iid does not exist
import com.google.android.gms.iid.InstanceIDListenerService;
^
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaInstanceIDListenerService.java:18: error: cannot find symbol
public class RixmaInstanceIDListenerService extends InstanceIDListenerService {
^
symbol: class InstanceIDListenerService
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:15: error: cannot find symbol
import com.google.android.gms.gcm.GcmPubSub;
^
symbol: class GcmPubSub
location: package com.google.android.gms.gcm
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:17: error: package com.google.android.gms.iid does not exist
import com.google.android.gms.iid.InstanceID;
^
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaGcmListenerService.java:20: error: cannot find symbol
import com.google.android.gms.gcm.GcmListenerService;
^
symbol: class GcmListenerService
location: package com.google.android.gms.gcm
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaGcmListenerService.java:22: error: cannot find symbol
public class RixmaGcmListenerService extends GcmListenerService {
^
symbol: class GcmListenerService
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaInstanceIDListenerService.java:34: error: cannot find symbol
startService(intent);
^
symbol: method startService(Intent)
location: class RixmaInstanceIDListenerService
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RixmaInstanceIDListenerService.java:28: error: method does not override or implement a method from a supertype
#Override
^
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:40: error: cannot find symbol
InstanceID instanceID = InstanceID.getInstance(this);
^
symbol: class InstanceID
location: class RegistrationIntentService
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:40: error: cannot find symbol
InstanceID instanceID = InstanceID.getInstance(this);
^
symbol: variable InstanceID
location: class RegistrationIntentService
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:42: error: cannot find symbol
GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);
^
symbol: variable INSTANCE_ID_SCOPE
location: class GoogleCloudMessaging
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:83: error: cannot find symbol
GcmPubSub pubSub = GcmPubSub.getInstance(this);
^
symbol: class GcmPubSub
location: class RegistrationIntentService
/tmp/build6570310071572581493xxx/RixmaM/src/main/java/com/rixma/mobile/RegistrationIntentService.java:83: error: cannot find symbol
GcmPubSub pubSub = GcmPubSub.getInstance(this);
^
symbol: variable GcmPubSub
location: class RegistrationIntentService
Please point me where i might be going wrong.
Many thanks
The old flag uses play services version 6.5.* the above were introduced on version 7.5 if I'm not mistaken
We temporarily disabled the Gradle build functionality as covered here.
There were just too many regressions, so for now it should be back to the old gplay services flag.
Related
after update to "^0.9.1" get this error on build app stage
Console:
C:\Users\IvanovichDev\Documents\check-dev-geo\mobile\node_modules#unimodules\react-native-adapter\android\src\main\java\org\unimodules\adapters\react\ReactAdapterPackage.java:10: error: package org.unimodules.adapters.react.apploader does not exist
import org.unimodules.adapters.react.apploader.RNHeadlessAppLoader;
^
C:\Users\IvanovichDev\Documents\check-dev-geo\mobile\node_modules#unimodules\react-native-adapter\android\src\main\java\org\unimodules\adapters\react\ReactAdapterPackage.java:20: error: package org.unimodules.apploader does not exist
import org.unimodules.apploader.AppLoaderProvider;
^
C:\Users\IvanovichDev\Documents\check-dev-geo\mobile\node_modules#unimodules\react-native-adapter\android\src\main\java\org\unimodules\adapters\react\ReactAdapterPackage.java:29: error: cannot find symbol
AppLoaderProvider.registerLoader(context, "react-native-headless", RNHeadlessAppLoader.class);
^
symbol: class RNHeadlessAppLoader
location: class ReactAdapterPackage
C:\Users\IvanovichDev\Documents\check-dev-geo\mobile\node_modules#unimodules\react-native-adapter\android\src\main\java\org\unimodules\adapters\react\ReactAdapterPackage.java:29: error: cannot find symbol
AppLoaderProvider.registerLoader(context, "react-native-headless", RNHeadlessAppLoader.class);
^
symbol: variable AppLoaderProvider
location: class ReactAdapterPackage
4 errors
Since a few hours ago, everytime i submit an IOS build to the CN1 build server, it errors. Even for apps which i have not changed and build fine 2 days ago. Android builds are fine. Please can you resolve.
Thanks
The bottom of the error log has:
Executing: javac -classpath /var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/classes -d /var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/classes /var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/stub/PocketMoneyStub.java /var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/stub/PocketMoneyStub.java:22: error: cannot find symbol
Display.getInstance().setProperty("build_key", d(BUILD_KEY));
^
symbol: variable Display
location: class PocketMoneyStub
/var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/stub/PocketMoneyStub.java:23: error: cannot find symbol
Display.getInstance().setProperty("package_name", PACKAGE_NAME);
^
symbol: variable Display
location: class PocketMoneyStub
/var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/stub/PocketMoneyStub.java:24: error: cannot find symbol
Display.getInstance().setProperty("built_by_user", d(BUILT_BY_USER));
^
symbol: variable Display
location: class PocketMoneyStub
/var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/stub/PocketMoneyStub.java:25: error: cannot find symbol
Display.getInstance().setProperty("AppVersion", APPLICATION_VERSION);
^
symbol: variable Display
location: class PocketMoneyStub
/var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/stub/PocketMoneyStub.java:26: error: cannot find symbol
Display.getInstance().setProperty("AppName", APPLICATION_NAME);
^
symbol: variable Display
location: class PocketMoneyStub
/var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/stub/PocketMoneyStub.java:27: error: cannot find symbol
Display.getInstance().setProperty("iosNewStorage", "true");
^
symbol: variable Display
location: class PocketMoneyStub
/var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/stub/PocketMoneyStub.java:50: error: cannot find symbol
r.addArgument("v", Display.getInstance().getProperty("AppVersion", "0.1"));
^
symbol: variable Display
location: class PocketMoneyStub
/var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/stub/PocketMoneyStub.java:51: error: cannot find symbol
r.addArgument("pl", Display.getInstance().getPlatformName());
^
symbol: variable Display
location: class PocketMoneyStub
/var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/stub/PocketMoneyStub.java:63: error: cannot find symbol
Display.getInstance().callSerially(new Runnable() {
^
symbol: variable Display
location: class PocketMoneyStub
/var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/stub/PocketMoneyStub.java:73: error: cannot find symbol
Display.getInstance().callSerially(this); }
^
symbol: variable Display
location: class PocketMoneyStub
/var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build8196920828988636221xxx/stub/PocketMoneyStub.java:99: error: cannot find symbol
Display.init(stub);
^
symbol: variable Display
location: class PocketMoneyStub
11 errors
Process return code is 1
CN1 did a redeployment, on their end, and all is working now. Thanks
I have been trying to use the refined with scalatest and am getting compiler errors at the "typer" phase: trying to do lub/glb of typevar ?F[?T, ?B]
This is my best attempt at a minimalist reproduction of the issue using a self-contained ammonite script:
import $ivy.`eu.timepit::refined:0.9.0`
import $ivy.`org.scalatestplus.play::scalatestplus-play:3.1.2`
import org.scalatest.{MustMatchers, WordSpec}
import scala.concurrent.duration._
import scala.concurrent.{Await, Future}
import eu.timepit.refined.auto.autoInfer
class RefinedSpec extends WordSpec with MustMatchers {
val duration = 500.millis
val fut = Future.successful("123")
Await.result(fut, atMost = duration)
}
If you make any one of the following changes to the above it will successfully compile:
delete: import eu.timepit.refined.auto.autoInfer
remove: with MustMatchers from the class definition
delete: Await.result(fut, atMost = duration)
To clarify, this is a compilation error, not a runtime error. The original error is happening in a play app (scala 2.11.11) whilst running test:compile in sbt, but it's probably easier to reproduce it with the ammonite script.
The ammonite version I'm using gives version info:
Welcome to the Ammonite Repl 1.1.2
(Scala 2.11.12 Java 1.8.0_25)
Installed using:
sudo sh -c '(echo "#!/usr/bin/env sh" && curl -L https://github.com/lihaoyi/Ammonite/releases/download/1.1.2/2.11-1.1.2) > /usr/local/bin/amm && chmod +x /usr/local/bin/amm' && amm
More error details from the ammonite example:
scala.reflect.internal.FatalError:
trying to do lub/glb of typevar ?F[?T, ?B]
while compiling: fail.sc
during phase: typer
library version: version 2.11.12
compiler version: version 2.11.12
reconstructed args: -nowarn -Yresolve-term-conflict:object
last tree to typer: Ident(<argument>)
tree position: line 15 of fail.sc
tree tpe: String
symbol: <none>
symbol definition: <none> (a NoSymbol)
symbol package: <none>
symbol owners:
call site: class RefinedSpec in object fail in package $file
From play sbt test:compile I also get this kind of output:
[error] last tree to typer: Ident(<argument>)
[error] tree position: line 13 of ...../RefinedSpec.scala
[error] tree tpe: String
[error] symbol: <none>
[error] symbol definition: <none> (a NoSymbol)
[error] symbol package: <none>
[error] symbol owners:
[error] call site: class RefinedSpec in package foo in package foo
[error]
[error] == Source file context for tree position ==
[error]
[error] 10 val duration = 500.millis
[error] 11 val fut = Future.successful("123")
[error] 12 Await.result(fut, atMost = duration)
[error] 13 }
This isn't a serious issue as I can just remove the autoInfer import as I'm not actually using it. It will trip people up though because they'll tend to do:
import eu.timepit.refined.auto._
to get automatic conversion from compile-time constants into refined types, when they can probably just get away with:
import eu.timepit.refined.auto.autoRefineV
Good day all
I just completed my codename one app and all went well while testing in the simulator, but on sending an android build it fails. I have checked the error log and cant seem to understand what the problem is. Below is the link showing the complete error log reported by the codename one server.
Link : https://www.dropbox.com/s/6f7fcr8l7fr1w4d/new%20error.txt?dl=0
This is the actual error from the log:
/tmp/build3509442697339141445xxx/myEvents/src/main/java/com/mycompany/myEvents/myEventsStub.java:65: error: package com.google.android.gms.ads does not exist
com.google.android.gms.ads.AdView adView = new com.google.android.gms.ads.AdView(this);
^
/tmp/build3509442697339141445xxx/myEvents/src/main/java/com/mycompany/myEvents/myEventsStub.java:65: error: package com.google.android.gms.ads does not exist
com.google.android.gms.ads.AdView adView = new com.google.android.gms.ads.AdView(this);
^
/tmp/build3509442697339141445xxx/myEvents/src/main/java/com/mycompany/myEvents/myEventsStub.java:68: error: package com.google.android.gms.ads does not exist
adView.setAdSize(com.google.android.gms.ads.AdSize.SMART_BANNER);
^
/tmp/build3509442697339141445xxx/myEvents/src/main/java/com/mycompany/myEvents/myEventsStub.java:69: error: package com.google.android.gms.ads.AdSize does not exist
AndroidImplementation.setViewAboveBelow(null, adView, 0, com.google.android.gms.ads.AdSize.SMART_BANNER.getHeightInPixels(this));
^
/tmp/build3509442697339141445xxx/myEvents/src/main/java/com/mycompany/myEvents/myEventsStub.java:70: error: package com.google.android.gms.ads does not exist
com.google.android.gms.ads.AdRequest adRequest = new com.google.android.gms.ads.AdRequest.Builder().addTestDevice("C6783E2486F0931D9D09FABC65094FDF").build();
^
/tmp/build3509442697339141445xxx/myEvents/src/main/java/com/mycompany/myEvents/myEventsStub.java:70: error: package com.google.android.gms.ads.AdRequest does not exist
com.google.android.gms.ads.AdRequest adRequest = new com.google.android.gms.ads.AdRequest.Builder().addTestDevice("C6783E2486F0931D9D09FABC65094FDF").build();
^
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.
6 errors
I'm guessing you defined the build hint android.googleAdUnitId or google.adUnitId which failed for some reason. AFAIK banner ads aren't used as often by our developers so it's possible something broke and no one noticed.
When I build my application I get following errors. Can you please let me know how to resolve it. My application needs to be supported on all platforms (Andriod, IOS, windows) and I don't want to write native code for all platforms separately.
java:4: error: package java.lang.reflect does not exist
import java.lang.reflect.UndeclaredThrowableException;
java:6: error: package javax.crypto does not exist
import javax.crypto.Mac;
^
7: error: package javax.crypto.spec does not exist
import javax.crypto.spec.SecretKeySpec;
java:48: error: cannot find symbol Mac hmac;
50: error: cannot find symbol
[javac] hmac = Mac.getInstance(crypto);
^
java:53: error: cannot find symbol
[javac] SecretKeySpec macKey =
^
[javac] symbol: class SecretKeySpec
[javac] location: class TokenGenerator
java:55: error: cannot find symbol
[javac] new SecretKeySpec(keyBytes, "RAW");
^
[javac] symbol: class SecretKeySpec
[javac] location: class TokenGenerator
java:61: error: cannot find symbol
[javac] } catch (GeneralSecurityException gse) {
[javac] ^
java:63: error: cannot find symbol
[javac] throw new UndeclaredThrowableException(gse);
[javac] ^
symbol: class UndeclaredThrowableException
[javac] location: class TokenGenerator
Those packages aren't supported by Codename One. Reflection can't be implemented in a performant way on devices and shouldn't be used in general since it conflicts with obfuscation which is a recommended best practice for mobile.
Crypto is a large over designed package with export restrictions and reflection dependencies. We have a cn1lib extension for bouncy castle.