Im building ionic 3 (angular5+es2015) application for android OS, it's working for android 7,8, and 9 but not for 6 version, and i got this error when startup application :
Any help please !
I think the issue is that the Javascript VM in Android 6 is too old to have support for arrow functions. The solution would be to use a transpiler like Babel to target the older VM, or to rewrite your code to remove uses of ES6 language features.
Edit: I'm sorry, I realized that there is a "Typescript" tag on this question. You might be able to adjust the target setting in tsconfig.json to output code that is compatible with the older Javascript version. Try using ES5, or if that does not work you can try ES3.
Related
I'm writing a Vulkan compute shader in Android studio and launching it on Android phone. The problem I'm experiencing is next - I can not use any subgroup operations like subgroupAdd and subgroupElect. When I'm trying to use these functions I have an error like this:
reduce_vec.comp:35: error: 'subgroup op' : requires SPIR-V 1.3
I have checked - my Android phone supports subgroups, and my shader accepts such extensions:
#extension GL_KHR_shader_subgroup_arithmetic: enable
#extension GL_KHR_shader_subgroup_basic: enable
The problem is pretty much straightforward, I need to update my SPIR-V. But according to my findings, SPIR-V that comes automatically with Android studio is not something I can update easily.
Did someone experience a similar issue before? What was your solution? Thanks in advance!
Android solution
You can pass arguments to the Android shaderc compiler in your Gradle DSL:
https://developer.android.com/ndk/guides/graphics/shader-compilers
You need glslcArgs to contain --target-env=vulkan1.1
Flexible solution
Build your own compilation pipeline to compile from source into SPIR-V, and then include the SPIR-V binary files directly into your Android project.
There are multiple language front-ends that can generate SPIR-V, for GLSL the Khronos tools are here:
https://github.com/KhronosGroup/glslang
I have a Xamarin for Android app that has been working until today. I needed to make a change but before I did, I ran a test to ensure no VS or Nuget package updates caused an issue. I have Xamarin.Essentials in my app and this line worked before, not sure what is happening now.
if(DeviceInfo.Model == "TC72"){scannerIndex = 1;}
Exception Unhandled:
Xamarin.Essentials.NotImplementedInReferenceAssemblyException: 'This
functionality is not implemented in the portable version of this
assembly. You should reference the NuGet package from your main
application project in order to reference the platform-specific
implementation.'
Any insight would be helpful. TIA
I changed the DeviceInfo.Model to Build.Model and get the same info I was expecting. That fixed my issue. If anyone has a different suggestion, happy to entertain them.
Added 8/11/21 3:25pm CT
I also found that changing my Compile Target to 10.0 fixed the Xamarin.Essentials issues. So far the application is working on 8.1 on the device (Zebra MC3300).
I just run into s problem.When I changed my gradle version to 2.1.0(old version is 1.5.0),my code went wrong.And it's wierd there is no logcat,so I just don't know how to find the problem and the wrong part code. I have tryed to add android:allowClearUserData="true" in my AndroidManifest .it turns out not working. when I change my gradle version to the old one,it goes well.I am a new coder,and I use Retrofit to do the network job.plz just help me.Oh and I open the OpenGL stack in the logcat,It will call glGetError() then it goes crush.
From your description, I have no idea. If only upgrading AS, it should be not crashed, but for possible updated SDK or Build tool Env. If you back to 1.5, even no crash when using same platform sdk, support library sdk?
After upgrading 2.1.0, When was crash happened? launching app, or opening some Activity? If later, you should limit your code to some extension, then searching from Google.
From crash info, it should be related with JNI. if you use JNI,your app has a library path in the app installed directory to list all support ABI .so. You could found the differ btw woking machine and abnormal one. From this stackOverflow, you can try too.
i am looking for a working barcode-scanner plugin..
i´ve already found this one:
https://github.com/phonegap/phonegap-plugin-barcodescanner
..but unfortunately it doesn´t work with the Google API 23 (there are errors occurring by the bookmarkcolumns plugin included).. as far as i know it works with api 22 or less
so the errors ocurr in the CaptureActivity (src folder) > com.google.zxing.client.android.share
files:
AppPickerActivity.java
BookmarkPickerActivity.java
ShareActivity.java
Error: BookmarkColumns cannot be resolved or is not a field
so my question is, is there any other barcode-scanner-solution for phonegap or is there a way to fix these errors?
any help would be appreciated!
thanks!
BarCode Scanner :
Click on the below link you will find multiple numbers of barcode scanner plugin. Please add which ever shoots your API level.
Barcode Scanner plugins
While using the Phonegap platform I've ran in to a problem. When trying to access any of the device strings, e.g. device.name or device.platform, I get as value undefined. This occurs on both iOS and Android. I've set the permissions for Android in both the ApplicationManifest and the config.
While doing research into the problem i found that the problem could be the the device functionality will only be available after about 1 to 3 seconds. I've ran some test, set a timeout at 10 seconds or even perform the action manually via onClick at different times (up to several minutes), but i keep getting the undefined value.
I've tried window.device.name instead of device.name, same result.
Does anyone have a clue why this is happening?
Running Phonegap 2.3.0 on iOS 6.0.2 and Android 4.1.2
Code:
$('#deviceName').html('Name: ' + device.name);
$('#devicePlatform').html('Platform: ' + device.platform);
$('#devicePlatformVersion').html('Version: ' + device.version);
Full Code here
Your help is mush appreciated!
"WARNING: device.name is deprecated as of version 2.3.0. Use device.model instead."
Refer to the following: http://docs.phonegap.com/en/edge/cordova_device_device.md.html#device.name
Accessing the Feature
As of version 3.0, Cordova implements device-level APIs as plugins. Use the CLI's plugin command, described in The Command-Line Interface, to add or remove this feature for a project:
cordova plugin add org.apache.cordova.device
As found in the documentations here:
http://docs.phonegap.com/en/edge/cordova_device_device.md.html
or
https://github.com/apache/cordova-plugin-device/blob/master/doc/index.md
device.model might be what you want.
http://docs.phonegap.com/en/2.3.0/cordova_device_device.model.md.html