Android Google Maps Version 2 Not Displaying - android-maps-v2

I know there have been a ton of posts on this topic, but I am puzzled. I have (2) different phones that I am testing my App on. The Google Map (Support Map Fragment) displays fine on each device, but only when I target each device directly from Eclipse (using the cable). If I create an APK file (via Exporting through Eclipse) and install the APK file that way on the device, the app runs fine, but the maps don't display (only zoom buttons appear). Here is the LogCat:
03-11 18:02:02.710: W/dalvikvm(31316): Unable to resolve superclass of Lmaps/p/s; (427)
03-11 18:02:02.710: W/dalvikvm(31316): Link of class 'Lmaps/p/s;' failed
03-11 18:02:02.710: W/dalvikvm(31316): Unable to resolve superclass of Lmaps/y/bo; (3820)
03-11 18:02:02.710: W/dalvikvm(31316): Link of class 'Lmaps/y/bo;' failed
03-11 18:02:02.710: W/dalvikvm(31316): Unable to resolve superclass of Lmaps/i/k; (4208)
03-11 18:02:02.710: W/dalvikvm(31316): Link of class 'Lmaps/i/k;' failed
03-11 18:02:02.710: E/dalvikvm(31316): Could not find class 'maps.i.k', referenced from method maps.z.ag.a
03-11 18:02:02.710: W/dalvikvm(31316): VFY: unable to resolve new-instance 3540 (Lmaps/i/k;) in Lmaps/z/ag;
I used the debug key, as I am just testing for now. Obviously each phone is set up correctly (Google Play Services etc.), which leads me to believe I am not exporting the APK file properly from Eclipse. Help!!

Found the solution. I was not signing the app properly when exporting the APK file. The debug keystore must be used - usually located in the ".android" folder in your user folder. The password is "android". If you enter everything correctly, you should be able to select the "androiddebugkey" from the "Alias". The password for that is also "android".
Of course when you download the app directly from eclipse to your phone (via the cable) and test it, the app is automatically 'signed' in debug mode, that is why it worked in that scenario.

Related

Cannot resolve manager type when using django-polymorphic with mypy django-stubs

I'm trying to use django-polymorphic to extend a DRF project that uses typeddjango with mypy-stubs. I recently started to use PolymorphicModels and mypy instantly started to complain and throw errors:
error: Could not resolve manager type for "<MyModel>.objects"
I included "polymorphic" and "django.contrib.contenttypes" in the INSTALLED_APPS of the project, and can't really make sense of why mypy keeps complaining. I read about inherited managers in the django-polymorphic doc which could be a cause for troubles, but I didn't manage to identify the root cause to find a fix.
I opened a ticket here: https://github.com/typeddjango/django-stubs/issues/1158 with more details.
If anyone has some info, I'd love to hear..

macdeployqt not authenticating application

I've compiled an application written using the Qt (5.15.2, C++) framework on a MacBook Pro (2019) and I have a certificate provided by my boss to authenticate the app. This is what I'm running to certify the app:
macdeployqt appName.app -codesign="Developer ID Application: company" -dmg -always-overwrite
This function call is not certifying the application and it is throwing error which from my research online doesn't seem to be well documented.
First, I get the non-fatal error:
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: fatal error: string table not at the end of the file (can't be processed) in file: ...
Where ... is the path of a .dylib included in the appName.app bundle. This error is iterated for all .dylib files in the app bundle. I have checked and the files are present in the directories. Why is this happening? I can view the files because they are binaries so I have no idea what they're doing inside.
Macdeployqt then continues and reports:
ERROR: "error: The specified item could not be found in the keychain.\n"
I'm thinking that I might be specifying the wrong name for the certificate (I'm not an app developer at all and the company is joking themselves if they think I know that I'm doing!)?
I have two questions.
Why am I getting string table errors in dylib files?
Why am I getting codesign errors? If I'm getting the codesign developer id name wrong, what part of the certificate information in key chain am I looking at?

How to invoke the Flex delegate for tflite interpreters?

I have a TensorFlow model which I want to convert into a tflite model, which is going to be deployed on an ARM64 platform.
It happens to be that two operations of my model (RandomStandardNormal, Softplus) seem to require custom implementations. Due to execution time being not that important, I decided to go with a hybrid model that uses the extended runtime. I converted it via:
graph_def_file = './model/frozen_model.pb'
inputs = ['eval_inputs']
outputs = ['model/y']
converter = tf.lite.TFLiteConverter.from_frozen_graph(graph_def_file, inputs, outputs)
converter.target_ops = [tf.lite.OpsSet.TFLITE_BUILTINS, tf.lite.OpsSet.SELECT_TF_OPS]
tflite_file_name = 'vae_' + str(tf.__version__) + '.tflite'
tflite_model = converter.convert()
open(tflite_file_name, 'wb').write(tflite_model)
This worked and I ended up with a seemingly valid tflite model file. Whenever I try to load this model with an interpreter, I get an error (it does not matter if I use the Python or C++ API):
ERROR: Regular TensorFlow ops are not supported by this interpreter. Make sure you invoke the Flex delegate before inference.
ERROR: Node number 4 (FlexSoftplus) failed to prepare.
I have a hard time to find documentation on the tf website on how to invoke the Flex delegate for both APIs. I have stumbled across a header file ("tensorflow/lite/delegates/flex/delegate_data.h") which seems to be related to this issue, but including it in my C++ project yields another error:
In file included from /tensorflow/tensorflow/core/common_runtime/eager/context.h:28:0,
from /tensorflow/tensorflow/lite/delegates/flex/delegate_data.h:18,
from /tensorflow/tensorflow/lite/delegates/flex/delegate.h:19,
from demo.cpp:7:
/tensorflow/tensorflow/core/lib/core/status.h:23:10: fatal error: tensorflow/core/lib/core/error_codes.pb.h: No such file or directory
#include "tensorflow/core/lib/core/error_codes.pb.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
By any chance, has anybody encountered and resolved this before? If you have an example snippet, please share the link!
When building TensorFlow Lite libraries using the bazel pipeline, the additional TensorFlow ops library can be included and enabled as follows:
Enable monolithic builds if necessary by adding the --config=monolithic build flag.
Add the TensorFlow ops delegate library dependency to the build dependencies: tensorflow/lite/delegates/flex:delegate.
Note that the necessary TfLiteDelegate will be installed automatically when creating the interpreter at runtime as long as the delegate is linked into the client library. It is not necessary to explicitly install the delegate instance as is typically required with other delegate types.
Python pip package
Python support is actively under development.
source: https://www.tensorflow.org/lite/guide/ops_select
According to https://www.tensorflow.org/lite/guide/ops_select#android_aar on 2019/9/25
Python support of 'select operators' is actively under development.
You can test the model in Android by using FlexDelegate.
I ran my model successfully in the same way.
e.g. https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/java/src/test/java/org/tensorflow/lite/InterpreterFlexTest.java

Getting this error *** OSError: cannot load library C:\WINDOWS\libzsfc.dll: error 0xc1

I am trying to load a .dll file using python cffi library, but whiele I am trying to load it I am getting following error:-
*** OSError: cannot load library C:\WINDOWS\libzsfc.dll: error 0xc1
I am using this
from cffi import FFI
ffi = FFI()
lib = ffi.dlopen("libzsfc.dll")
but this giving me error, I tried a lot to resolve this, but it remains same, please let me know if anyone faced same issue.
I think you have to first register the dll in windows then load will work fine.
To register the same use command regsvr32 <complete dll path>
Use Regsvr32.exe from the %SystemRoot%\Syswow64 folder. For example, type the following commands to register the DLL: cd \windows\syswow64 regsvr32 c:\filename.dll
Old question, but I just had the same issue. Fixed:
Super easy - reinstall tessaract. Head over to https://github.com/UB-Mannheim/tesseract/wiki. Get their installer. It'll have you uninstall the old version. Worked immediately for me.

Groovy/Grails Unit Test Error with custom codec

I am having an issue with the "Getting Started with Grails" tutorial from the Grails website. It is having me create a custom codec in the utils directory. I have created the codec and it works in the application, however when I add the codec to my controller unit test, as the tutorial suggests, it fails. Here is the message I get when I run "grails test-app UserController -unit":
"No such property: SHACodec for class: racetrack.UserControllerTests"
I have tried using the loadCodec() method to include the codec, but got the same message.
Does anyone have any suggestions on how to resolve this unit test issue? If it's an import issue, what would the import path be for my SHACodec.groovy file if it is in the /grails-app/utils/?
My tutorial code is available for download at http://arlitt.com/racetrack.zip.
I ran into this too (working through the code in the Grails book).
What I found works is this: explicitly load the codec. You don't need to include it in your imports. Make sure that the SHACodec.groovy file is in the grails-app/utils directory.
The following code snippet shows you how I did it.
class UserControllerTests extends ControllerUnitTestCase{
protected void setUp() {
super.setUp()
loadCodec (org.codehaus.groovy.grails.plugins.codecs.Base64Codec)
loadCodec (racetrack.SHACodec)
}
// ...
}
Codecs are not automatically loaded, you need to load them.
Refer to this post for more details: http://kousenit.wordpress.com/2010/02/24/using-a-codec-in-a-grails-unit-test/