I get this exception when hitting this line of code in my project. Any ideas?
line of code:
var JsonData = JsonConvert.DeserializeObject<LoginModel>(ResultData);
exception:
{System.MissingMethodException: Method 'SQLite.Net.Attributes.AutoIncrementAttribute..ctor' not found.
at (wrapper managed-to-native) System.MonoCustomAttrs:IsDefinedInternal (System.Reflection.ICustomAttributeProvider,System.Type)
at System.MonoCustomA...
oddly it works fine if I run the project in Visual Studio for Mac 2017, but when I run it on VS 2017 on Win 10 I get this exception. Exact same code, no changes. So it must be an environmental thing, but I have no clue what.
Related
I'm new to NativeScript and took over a project recently upgraded from NativeScript 4 to 6. Here is my environment detials:
Windows 10
Node v16.6.1
NativeScript 8.0.2
Android Studio 11 (with al
the recommended updates to date)
VS Code 1.58.2
I can create a new Native script project with "tns create" and build/run it in the simulator just fine. However, when I try to run the project the build throws the following error:
java.lang.RuntimeException: Class not found android.support.v4.view.ViewPager.OnPageChangeListener
at org.nativescript.staticbindinggenerator.Generator.getClass(Generator.java:551)
at org.nativescript.staticbindinggenerator.Generator.getInterfacesFromCache(Generator.java:534)
at org.nativescript.staticbindinggenerator.Generator.writeBinding(Generator.java:283)
at org.nativescript.staticbindinggenerator.Generator.generateBinding(Generator.java:171)
at org.nativescript.staticbindinggenerator.Generator.processRows(Generator.java:234)
at org.nativescript.staticbindinggenerator.Generator.generateBindings(Generator.java:121)
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:97)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:55)
Here is the run command I'm using: "tns run android --emulator"
I have tried tons of things and searches but no luck resolving this issue.
So I had an idea and searched with a different search engine than I normally use. I did find some ideas which helped me resolved the issue.
I had previously searched in VSCode for variations on "android.support.v4.view.ViewPager.OnPageChangeListener", but only found the log file with the error. Then I learned you have to change the filter options of the find in file search otherwise the files you are looking for can be excluded from the search results. I also used Baregrep to confirm I was getting everything.
I fixed the issue by replacing all occurrences of:
android.support.v4.view.ViewPager with androidx.viewpager.widget.ViewPager
Also you may need to install widgets:npm i tns-core-modules-widgets
Since the files where I made the changes were all non-project files (many of them in the node_modules directory) there is probably something else that involves updating Node or NativeScript that may solve this as well.
If someone else figures that out, I'll be watching this thread for updates, and thanks in advance!
Fissh
i am using visual studio and xamarin to build android and ios applications .
i am looking for a way to add the (gracenote SDK) gnsdk to my solution , and all the SDKs are not working.
what i did till now is :
i downloaded all the gnSDKs and tried to use all of them one by one and i failed for different reasons
1-gnsdk-3.07.7.3701o-20150714:
i was able add a reference to the gnsdk_csharp.dll in the android app, and i tried adding the (gnsdk_csharp_marshal.dll) as a reference but for sure it didn't work so i added it as a file to the project and also all the other Dlls from gnsdk like the (gnsdk_manager.dll,....)
i set the build action to content , and the copy option to "copy if new".
if i do the above in a windows form application the code works fine, and i can create an object of GnManager .
when i do this in an android app, the project compiles , but once i run it on the mobile phone and i reach the code
gnManager_ = new GnManager("Lib",gnLicense_,GnLicenseInputMode.kLicenseInputModeString);
i get the following error
{System.TypeInitializationException: The type initializer for 'GracenoteSDK.gnsdk_csharp_marshalPINVOKE' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. ---> System.DllNotFoundException: gnsdk_csharp_marshal at (wrapper managed-to-native) GracenoteSDK.gnsdk_csharp_marshalPINVOKE+SWIGExceptionHelper:SWIGRegisterExceptionCallbacks_gnsdk_csharp_marshal (GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate,GracenoteSDK.gnsdk_csharp_marshalPINVOKE/SWIGExceptionHelper/ExceptionDelegate) at GracenoteSDK.gnsdk_csharp_marshalPINVOKE+SWIGExceptionHelper..cctor () [0x000ef] in :0 --- End of inner exception stack trace --- at GracenoteSDK.gnsdk_csharp_marshalPINVOKE..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at GracenoteSDK.GnManager..ctor (System.String gnsdkLibraryPath, System.String license, GnLicenseInputMode licenseInputMode) [0x00000] in :0 at AndXamGNtest.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00066] in D:\Mediawave\AndXamGNtest\AndXamGNtest\MainActivity.cs:51 }
so why is this happening , and why is that gnsdk_csharp_marshal is not being copied to the phone , i tried coping it my self to the path in the error but still does not work.
2-gn-mobile-android-1.1.7.3690
tried to build an android binding library using the jar files, when i compiled i got hundreds of error in the generated code that i couldn't fix.
3-gn-mobile-winphone8-1.1.6.3529
i was able to get that sample project to work that comes with the SDK , and running it on my computer as an emulator it worked fine , and it was able to detect music and ID them correctly , but that DLL, i was not able to add reference to it in any other app , other than that sample project and every time i try to add it to a windows form application or an android application it gives an error that it is not a defined DLL.
please advice on any of the 3 ways above which is the correct one , and if there is a way to get it working ,
thanks .
I am new here. When I use Inspect Code in Android Studio 0.9.2, I get the error:
null
java.lang.StackOverflowError
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:265)
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:266)
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:266)
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:266)
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:266)
But when I run lint command in Term, it works fine.
Can't build streamer tutorial_3 for android on mac
I,ve got all environment variables needed.
My eclipse can't to resolve some symbols, but to some of them i can get by pushing F3. It's very strange for me.
Here is the command line output:
23:04:06 **** Build of configuration Default for project Tutorial3 ****
/Users/antonivanuskin/android-develop/android-ndk-r10/ndk-build all
GStreamer : [GEN] => gst-build-armeabi/gstreamer_android.c
GStreamer : [COMPILE] => gst-build-armeabi/gstreamer_android.c
GStreamer : [LINK] => gst-build-armeabi/libgstreamer_android.so
lto1: fatal error: bytecode stream generated with LTO version 2.2 instead of the expected 3.0
compilation terminated.
lto-wrapper: /Users/antonivanuskin/android-develop/android-ndk-r10/toolchains/arm- linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc returned 1 exit status
/Users/antonivanuskin/android-develop/android-ndk-r10/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.gold: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [buildsharedlibrary_armeabi] Error 1
23:04:10 Build Finished (took 3s.740ms)*
I use ndk-10r and gst-1.4.0.
I know that there is no interfaces/xoverlay in new streamer.
EDIT
I've built ok, but steel got underlines of many glib-types and GST-macross. Here is a screenshot:
what is interesting that i have no underlined headers, for example: i've include pthread.h but have got underlined pthread_t and phtread_key_t....
i think that i have not install some general libraries on my mac, something like libc or what ever...may it couse this problem? The problem is that i can't run my app from eclipse. and for more: i use DS-5 CE IDE
This is most likely because we build the android 1.4.x cerbero packages with the r9d NDK.
You might want to use the r9d NDK until we provide binaries built with a more recent NDK (started some builds to see if everything goes through fine).
Attempting to run a Kotlin Android project using Android Studio compiles successfully and generates an APK, but when Studio tries to install the APK on the device the installation fails with INSTALL_FAILED_DEXOPT. Looking through logcat I can see messages similar to:
12-13 22:43:57.219: ERROR/dalvikvm(1623): Out-of-order method_idx: 0x2bff then 0x2bff
12-13 22:43:57.219: ERROR/dalvikvm(1623): Trouble with item 897 # offset 0x13e498
12-13 22:43:57.219: ERROR/dalvikvm(1623): Swap of section type 2006 failed
12-13 22:43:57.219: ERROR/dalvikvm(1623): ERROR: Byte swap + verify failed
12-13 22:43:57.230: ERROR/dalvikvm(1623): Optimization failed
The project was converted from Java using the Kotlin IDEA plugin's automatic conversion. There are no compiler warnings.
This occurs when a method name collides with a Kotlin-generated etter, for example:
class Foo(val bar: Any) {
fun getBar(): Any {}
}
Rename bar or getBar to something else. For more information see http://youtrack.jetbrains.com/issue/KT-3170
Recently the similar issue has been discovered on devices running api 17- with Kotlin 1.0.0-beta-1038.
To fix this issue use new beta build 1.0.0-beta-1103.
https://devnet.jetbrains.com/message/5561799#5561799