NoSuchMethodError for Card.setText() in XE16 - google-gdk

My Glass updated to XE16 last night and I've been trying out my Glassware on it. I was able to get some of them running, but I am getting NoSuchMethodErrors on Card.setText() and Card.setFootnote() calls:
java.lang.NoSuchMethodError: com.google.android.glass.app.Card.setText
I updated my AndroidStudio projects to use the Glass Development Kit Preview on API 19 (4.4.2) and the compiler doesn't balk on the calls. The Glassware throws the error when the method is executed.
Anyone else seeing the same problem?
Thanx in advance.

This is because the Card#setText(String) method signature changed from expecting a String to a CharSequence.
You need to make sure to recompile your code with the latest GDK in order to pick up the new reference.

Related

Why is my android studio kotlin plugin version in different format than my co-workers?

I stumbled into an issue where all my unit test classes fail to run, providing the following error:
java.lang.IllegalStateException: Failed to transform class with name <my class name>. Reason: toPrettyPrint (Ljava/lang/String;)Ljava/lang/String; in <my class name>: inconsistent stack height -1
One user commented on the following github thread for powermock, that the same error first happened to them after updating their kotlin plugin:
https://github.com/powermock/powermock/issues/779
After reading this, I have checked with my colleagues to see maybe they have a different kotlin version, and saw that their kotlin plugin version is
203.1.6.0-release-798-AS7717.8, whereas mine is 1.4.32-release-Studio4.1-1.
What I find peculiar abbout this, is that these versions dont follow the same conventions, they look more like two completely different sofware. Is there any way for me to get the same version for my kotlin plugin ?
Any help or clarification is much appreciated, thanks!
They probably just changed the naming scheme for the plugin. Looks like you have one that is about one and a half years out of date.
Anyway, go to File -> Settings -> Languages & Frameworks -> Kotlin and click the Install button.

Mvvmlight and Xamarin.iOS unable to find default ctor

I have a project that is running fine on Android and WinPhone 8. When I attempt to run on iOS, I've getting the following error
Microsoft.Practices.ServiceLocation.ActivationException: Cannot
register: No public constructor found in x
where x is whatever SimpleIoc.Default.Register<T, TU>(); the flow hits first. I've moved the code around (as suggested elsewhere) to ensure all of the platform specific SimpleIoc calls are made in ViewModelLocator.
I've added public default ctors in the classes that are complaining about the error (I have though set the PreferredConstructor to the original, not the newly added public ctor).
I have a feeling that this error is a false positive (something else is failing, but pointing at that code).
Using Xam.iOS via a build server (the code is coming from VS2015). Xcode is running the 8.3 emulators (it may need updating to allow for 8.4 testing)
It could be that the Linker is optimising away the constructor, if it thinks it's not used. Try setting the Linker Options to "Don't Link" and see if it does it again, or even new-up an instance of the class elsewhere so that the Linker knows that the constructor is used. You don't necessarily want to leave it that way, but if it eliminates the error, you'll at least know the reason.
The [Preserve] attribute did the trick for me.
Decorate constructor with it and keep your linker settings.
This attribute is part of the Microsoft.WindowsAzure.MobileServices namespace.

How to make gnuhawk component AudioSink load to redhawk?

Running CentOS 6.5 and RedHawk 1.9.0, and I have audio-components installed in $SDRROOT, and AudioSink shows up in palette, all good. However when I double click to launch it I get the error:
Launching component AudioSink_1 has encountered a problem
and
Failed to launch: AudioSink_1.
When I click on details I get:
Failed to launch: AudioSink_1
and
IDL:CF/ExecutableDevice/ExecuteFail:1.0
Not very informative. Components AudioSource and AudioTestSource also do not launch.
I was having a very similar issue to what you described when I was trying to use Axios-Engineering's RTLTcpSource component. What the issue was for me was I was installing the component incorrectly. So for me this is how I installed a component in REDHAWK.
Download the original source code. (unzip if necessary)
Open the REDHAWK IDE(eclipse)
File->Import...->Existing Projects into Workspace->next->select the source code folder->Finish
Project->Build Project
Drag project folder to "Target SDR" in the SCA Explorer
I hope this helps you or anyone else. I know there aren't really many places that tell you how to actually add an external component to REDHAWK and it took me a while to figure out to just treat it like a normal custom component.
I had a similar problem when using audiosink. The answer above by JD will work but make sure you re-gen the component since the code was made in 1.84 and there is a new codegen for 1.9.
It may also throw a message saying there are errors when exporting to the target SDR but that can mostly be ignored from my experience.
Similarly if you want more of an output, you can run the component/device through the terminal sandbox after building it and set "-Debug 4" to get more information.
Good luck!
edit: seems like a bug with audiosink was addressed: AudioSink unknown error
you might want to just pull down the updated version and try that!

Clang scan-build is not picking up -fno-objc-arc flag on non-ARC'd files

Hi I have an XCode project which is ARCd but uses some 3rd party (AFNetworking) classes which are not ARCd. I have specified the -fno-objc-arc flag against these files however when I run scan-build I get a number of errors such as:-
error: 'autorelease' is unavailable: not available in automatic reference counting mode
I can see that scan-build is using -fobjc-arc when compiling / checking these classes which is incorrect.
Please could someone advise how I can get scan-build to pick up the correct settings?
FYI I am using checker-267 version downloaded from http://clang-analyzer.llvm.org/
Many thanks
Raised this with the clang team at Apple and they swiftly came back to say that this is a known bug, see:
http://llvm.org/bugs/show_bug.cgi?id=13683
A new version of the checker should be released soon to fix this.

Java JSR-82 Implementation (javax.Bluetooth.*) - Using Bluecove

I am searching for some help with JSR-82. I have searched for a long time, and even had my project supervisor at uni helping me out, and so far, I have had no luck.
My Problem...
I have a project whereby I simply need to scan for Bluetooth Devices
I have not yet been able to get my Bluetooth device scanning. I am using Eclipse IDE in CentOS 5.5
and am trying to use Bluecove.
I have downloaded "bluecove-gpl-2.1.0.jar" and added it to my Eclipse Build Path and the code i am using is sample code provided by BlueCove (RemoteDeviceDiscovery Found here: http://bluecove.org/bluecove/apidocs/overview-summary.html#DeviceDiscovery).
Before i can even compile, javax.Bluetooth.*; is underlined suggesting it cannot find it - Now as far as i am aware, this should be within the bluecove jar file i mentioned previously.
How on earth do I get this thing working? Ive tried using JSR82.com but that wasnt much help at all
If any one has the time to assist me, you would be concidered a god! haha
thanks
Ryan
With bluecove on linux you need to provide the bluecove.jar and bluecove-gpl.jar. http://code.google.com/p/bluecove/wiki/Documentation
you will be needing 4 jar files: bluecove.jar,bluecove-emu.jar,electricblue.jar, javabluetooth.jar
however my code based on jsr82 implimentation did not work on samsung mobiles.... it is said that it does not support jsr82 stack. if anyone has idea on this share..

Resources