Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all 204402 articles
Browse latest View live

Error when attempting to compile Xamarin iOS project using msBuild.

$
0
0

IDE : Visual Studio 2017
Xamarin iOS : 11.8 (same as on Mac "slave")

msbuild command : /p:Configuration=Debug /p:Platform=iPhone /p:ServerAddress=x.x.x.x /p:ServerUser=jenkins /t:Build My.sln

I am able to connect to the mac agent and build the iOS project using Visual Studio. Even the IPA is "created" successfully on the Windows machine and Mac machine. However, my goal is to automate this via Jenkins and the msbuild command fails with this error message. I am also able to execute the above msbuild command manually. However, when jenkins executes the exact same command, I get the following error.

(_ResolveUniversalTypeIdentifiers target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.After.targets(254,3): error : The current connection has never been connected. It needs to be connected first in order to use it as an active connection [D:......\My.iOS.csproj]

I am suspecting, it could be permissions related as Jenkins is executing as "Local System". Any ideas ?


Timepicker 24hour and custom interval on Android

$
0
0

I can't seem to get this right. There are some old post on this subject but non of them offer a working solution. This is what I'm trying to get done:

  • Timepicker in 24hour format instead of am/pm
  • Custom interval, for example 15 minute or 20 minute interval in the picker
  • The custom picker must be able to show when Focus() is set in code

works easily in iOS but can't get the Android customrenderer to work :(

Anyone any ideas?

Alert Explossion in Xamarin Forms.

$
0
0

Hi,

I'm developing an application with Xamarin Forms 2.3.4.247 and Prism 6.3.0.

I'm currently having an issue that I've been unable to solve or to identify what's causing it.

When my application being executed on release mode, after a few hours of usage the screen gets filled with all the Alerts displayed during the session lifetime. It just explodes, showing a bunch of cascading alerts and then the application stops working.

The code I'm using to show alerts varies in these 4 ways:

await _pageDialogService.DisplayAlertAsync(Resources.Localization.Main.Main_Success_Label, successMessage, Resources.Localization.Main.Main_OK_Label);
await _pageDialogService.DisplayAlertAsync(errorTitle, errorMessage, cancelButton);
await _pageDialogService.DisplayActionSheetAsync(title, cancelButton, destroyButton, otherButtons);
await _pageDialogService.DisplayAlertAsync(errorTitle, errorMessage, cancelButton);

I'm using IPageDialogService from Prism.Services.

When I use it these lines of code (separately) in different part of my application the alert displays without problem. But after a while all of them get displayed again.

Does anybody know what could be the cause of this? Or how to solve it?

I want to open a cross platform app but it doesn't appear at my Visual studio preview.

Warnings fakeLogOpen

$
0
0

I get some warnings in my xamarin android project like these:

fakeLogOpen(/dev/log_security, O_WRONLY) failed
fakeLogOpen(/dev/log_crash, O_WRONLY) failed

There is no any more description of warnings. I would very much appreciate any help or guidance you are able to give me.

Localizing With RESX Resource Files Does Not Work

$
0
0

My location resources files stopped working. I have two files, AppResources.resx and AppResources.pt-BR.resx and it WAS WORKING before of updating the VS for the update of iOS 11, but I only noticed yesterday that isn't working anymore.

Anyone know how to fix?? A workaround maybe? I found this https://bugzilla.xamarin.com/show_bug.cgi?id=31720 but I'm with problem with Android and iOS. So sad. =/

I'm using VS for Mac (community version 7.1.5 build 2). Thanks.

Xamarin Forms Developer - REMOTE.

$
0
0

A U.K company is looking for additional developers to work on a new project using Xamarin Forms. Competitive rates, work from home.

Job Responsibilities

Develop and maintain Xamarin applications in Forms and be ready to jump into Native if it's necessary to solve the requirement.
Never compromise on quality. Plan and provide estimates on tasks.
Excellent knowledge of Xamarin Forms and .Net
Excellent Knowledge of memory management
Excellent understanding of iOS and Android limitations.

  • PLEASE NO OUTSOURCING COMPANIES -

How to get the number of active subscriptions in xamarin-ios?

$
0
0

I am going to get the number of subscriptions in xamarin-ios. But I can't find the solution anywhere. How can I get the number of current active subscriptions in xamarin-ios?


Xamarinorms How to listen to ClipBoard Copy and get Copied word when App is in the background

$
0
0

I want to listen to ClipBoard Copy and retrieve the copied word when App is onPause()
I am implementing a listener but app crash when I put the app on the background
protected override void OnSleep()
{
// Handle when your app sleeps
base.OnSleep();
RegPrimaryClipChanged();

        }
 private void RegPrimaryClipChanged()
        {

            if (!bHasClipChangedListener)
        {
                ClipBoardManager.AddPrimaryClipChangedListener(new OnPrimaryClipChangedListener());
            bHasClipChangedListener = true;
        }


Listener Class : 


        public class OnPrimaryClipChangedListener : Java.Lang.Object, ClipboardManager.IOnPrimaryClipChangedListener
        {
            ClipboardManager myClipBoard;

            public void onPrimaryClipChanged()
            {
                ClipData clipData = myClipBoard.PrimaryClip;
                 ClipData.Item item = clipData.GetItemAt(0);
            }


            public void OnPrimaryClipChanged()
            {
                throw new NotImplementedException();
            }
        }

Xamarin.Android app that tries to use Google Maps API displays blank screen on Samsung Tab S2

$
0
0

I am using VS 2017 to build a cross platform app. Ok so I got a Google Map key, no restrictions and put this in the AndroidManifest.xml file as :
.
I used Live Player app to load debug version onto the tablet. Tested app running ok on tablet by simply displaying some text. Then tried to display a map. Used code from from MapsDemoPage from FormsGallery sample to verify Google Map Key and not an issue with the code. Still blank page. So decided maybe I should restrict the Google Map key. To do this I needed the SHA value for debug.ketystore. Well I don't have a Local\Xamarin\Mono for Android\debug.keystore. So how do I create one????

application terminates when ios is opened

$
0
0

My application runs on the emulator, on the mobile it opens and ends. Apple rejected it and gave me this error. You know what it is?

{"app_name":"meuappApp.IOS","timestamp":"2018-03-11 04:39:25.79 -0700","app_version":"1.0","slice_uuid":"edfcbb95-3b54-3d9f-9ad4-5cb6462aa990","adam_id":0,"build_version":"1.7","bundleID":"com.meuappapp.meuapp","share_with_app_devs":false,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 11.2.5 (15D60)","incident_id":"3CD2E372-8BAC-4E7A-A03C-7D5E8B6768D2","name":"meuappApp.IOS"}

Incident Identifier: 3CD2E372-8BAC-4E7A-A03C-7D5E8B6768D2
CrashReporter Key: d1e255b6bbba63239d1ebcb358f272a4ff92d897
Hardware Model: iPad5,1
Device Model: J96AP
Process: meuappApp.IOS [337]
Path: /private/var/containers/Bundle/Application/5D8FA83E-3A75-4C62-B1AF-B0344CF22C33/meuappApp.IOS.app/meuappApp.IOS
Identifier: com.meuappapp.meuapp
Version: 1.7 (1.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd.development [1]
Coalition: com.meuappapp.meuapp [414]

Date/Time: 2018-03-11 04:39:25.6692 -0700
Launch Time: 2018-03-11 04:39:23.0013 -0700
OS Version: iPhone OS 11.2.5 (15D60)
Baseband Version: n/a
UDID: 19d5688bcf385b1407699196b9432bed7c64d9a9
Report Version: 104

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0

Application Specific Information:
abort() called

Filtered syslog:

Timestamp Thread Type Activity PID
2018-03-11 04:24:33.0712 -0700
0x46b 1024 0x0 100 hangtracerd: XPC: Client started new connection: pid 68
2018-03-11 04:24:33.0715 -0700
0x46b 1024 0x0 100 hangtracerd: New proc: /usr/libexec/backboardd(68)
2018-03-11 04:24:33.0716 -0700
0x46b 1024 0x0 100 hangtracerd: Initialization complete now watching hangs for backboardd(68) | com.apple.coreanimation.display.primary.hangEvent
2018-03-11 04:24:33.0748 -0700
0x400 1024 0x0 100 hangtracerd: refreshPreferences: Memory Logging Enabled
2018-03-11 04:24:33.0749 -0700
0x400 1024 0x0 100 hangtracerd: refreshPreferences: Hang Tracing Enabled
2018-03-11 04:24:33.0749 -0700
0x400 1024 0x0 100 hangtracerd: refreshPreferences: HangTracerEnableTailspin = 1
2018-03-11 04:24:33.0749 -0700
0x400 1024 0x0 100 hangtracerd: refreshPreferences: App Activation Logging Disabled
2018-03-11 04:24:45.6118 -0700
0x687 1024 0x0 100 hangtracerd: XPC: Client started new connection: pid 62
2018-03-11 04:24:45.6121 -0700
0x687 1024 0x0 100 hangtracerd: New proc: /System/Library/CoreServices/SpringBoard.app/SpringBoard(62)
2018-03-11 04:24:45.6122 -0700
0x687 1024 0x0 100 hangtracerd: Initialization complete now watching hangs for SpringBoard(62) | UIKit-runloop
2018-03-11 04:24:47.5319 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Hang detected 1.95s (UIKit-runloop)
2018-03-11 04:24:47.5468 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Attempting to save tailspin at /var/root/Library/Caches/hangtracerd/tmp/UIKit-runloop-SpringBoard-2018-03-11-042447.tailspin
2018-03-11 04:24:48.9447 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Moving tailspin to spool: /var/root/Library/Caches/hangtracerd/spool/UIKit-runloop-SpringBoard-2018-03-11-042447.tailspin
2018-03-11 04:24:48.9457 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard Log credits: 4 -> 3
2018-03-11 04:24:48.9457 -0700
0x687 1024 0x0 100 hangtracerd: Daily Log credits: 25 -> 24
2018-03-11 04:24:53.9378 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Hang detected 6.41s (UIKit-runloop)
2018-03-11 04:24:53.9381 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Attempting to save tailspin at /var/root/Library/Caches/hangtracerd/tmp/UIKit-runloop-SpringBoard-2018-03-11-042453.tailspin
2018-03-11 04:24:56.6531 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Moving tailspin to spool: /var/root/Library/Caches/hangtracerd/spool/UIKit-runloop-SpringBoard-2018-03-11-042453.tailspin
2018-03-11 04:24:56.6535 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard Log credits: 3 -> 2
2018-03-11 04:24:56.6535 -0700
0x687 1024 0x0 100 hangtracerd: Daily Log credits: 24 -> 23
2018-03-11 04:25:10.5716 -0700
0x935 1024 0x0 100 hangtracerd: refreshPreferences: Memory Logging Enabled
2018-03-11 04:25:10.5716 -0700
0x935 1024 0x0 100 hangtracerd: refreshPreferences: Hang Tracing Enabled
2018-03-11 04:25:10.5716 -0700
0x935 1024 0x0 100 hangtracerd: refreshPreferences: HangTracerEnableTailspin = 1
2018-03-11 04:25:10.5716 -0700
0x935 1024 0x0 100 hangtracerd: refreshPreferences: App Activation Logging Disabled
2018-03-11 04:36:33.0380 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Hang detected 1.25s (UIKit-runloop)
2018-03-11 04:36:33.0386 -0700
0x687 1024 0x0 100 hangtracerd: SpringBoard: Attempting to save tailspin at /var/root/Library/Caches/hangtracerd/tmp/UIKit-runloop-SpringBoard-2018-03-11-043633.tailspin

Problem building iOS project

$
0
0

I had a working Xamarin development environment building my iOS project when I noticed that I created my user account on my MacBook with the wrong name resulting in my user directory also having the wrong name. After correcting the account name using the recommended steps, I discovered the Xamarin iOS build is now failing because, at some point in the build process, it is looking for the provisioning profiles using a path that includes the old, now incorrect, user directory. I cannot discover how/where to reset it. I have tried 'forgetting' the server and re-connecting the Xamarin Agent and re-installing XCode on the MacBook. Neither solved the problem. Any suggestions appreciated. Thanks in advance!

Creating New Cross-Platform Project in Visual Studio

$
0
0

Hi!

So, I just updated Visual Studio 2017 - Community to version 15.6.1. After this update, I no longer have the option to select between Native and Xamarin.Forms UI Technologies when I'm creating a new project. I can't post pictures/links yet, but the "UI Technology" GroupBox doesn't exist in the "New Cross-Platform App" window, while the Info TextArea to the right still states that I should pick one between Native or Xamarin.Forms.

Is this a bug, or there has been a change in Xamarin related to this, which I'm not aware of? If the latter is true, which one is the new standard? If, instead, the former is true, what can I do to solve it?

Thanks!

Visual Studio 15.6 - "AndroidKeyStore" not working

$
0
0

I use AndroidKeyStore in my project. But this is not working in Visual Studio 15.6. I run create archive and get error "apksigner.bat return code 2".
Xamarin Team - this is bug.

error MSB6006: "apksigner.BAT" since upgrading to VS 15.6

$
0
0

Has anyone had any problem with the signing their apks while deploying since upgrading to VS 15.6? If I run the command that VS is using on the command line I get the message.

Missing input APK

BUT note the apk file is definitely in the directory that the command is using.

Is VS 15.6 the first version to use apksigner rather than jarsigner? Anyone have any ideas about how to fix this?

Just to make it stranger, it's fine with the debug.keystore but not our app keystore which we've been using without issue for about 4 years.


Any (new/demo) project Deployment keeps failing! Visual Studio 2017

$
0
0

Hi all,

I'm trying to get VS with Xamarin working but I just can't get it working.

The problem:
If I try to build and deploy any Android project (HelloWorld, blank app etc.), it always fails deploying. I have tried different Android devices but also emulators. I have reinstalled VS, checked en reinstalled JDK, SDK, NDK, ran it as an administrator but it just keeps failing to deploy. This is my output:

1>------ Build started: Project: HelloWorld, Configuration: Debug Any CPU ------
1> HelloWorld -> D:\Downloads\HelloWorld\bin\Debug\HelloWorld.dll
2>Starting deploy Samsung SM-G935F ...
2>Deploying Samsung SM-G935F ...
2>Build started.
2>Project "HelloWorld.csproj" (Install target(s)):
2>D:\VisualStudio2017\MSBuild\15.07\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0
2>iels\AppData\Local\Temp\MonoAndroid,Version=v7.0.AssemblyAttributes.cs" obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
2>HelloWorld -> D:\Downloads\HelloWorld\bin\Debug\HelloWorld.dll
2>C:\Program Files\Java\jdk1.8.0_161\bin\keytool.exe -list -alias androiddebugkey -storepass android -keypass android -keystore "C:\Users
2>iels\AppData\Local\Xamarin\Mono for Android\debug.keystore"
2>C:\Program Files (x86)\Android\android-sdk\build-tools\25.0.3\zipalign.exe 4 "D:\Downloads\HelloWorld\obj\Debug\android\bin\com.xamarin.helloworld.apk" "bin\Debug\com.xamarin.helloworld-Signed.apk"
2>C:\Program Files (x86)\Android\android-sdk\build-tools\25.0.3\apksigner.BAT sign --ks "C:\Users
2>iels\AppData\Local\Xamarin\Mono for Android\debug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 4 --max-sdk-version 27 bin\Debug\com.xamarin.helloworld-Signed.apk
2>"apksigner.BAT" exited with code 1.
2>Done building project "HelloWorld.csproj" -- FAILED.
2>Build FAILED.
2>Deploy failed on Samsung SM-G935F
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

I don't know what else I could do, so I could really use some help.. Does anyone have some other ideas on what might cause the problem and what might work?

Thanks!

How to pass a binding from Xaml to a public variable?

$
0
0

I have a ContentPage class (Let's call it ClassOne) that contains a public variable:

public string Title { get; set; }
public PostList()
{
   this.InitializeComponent();
   BindingContext = this;
}

And its Xaml file has a label which takes info from the Title:
<Label Text="{Binding Title}" TextColor="Red" />

It works if I set the Title property within the class, but I'm trying to pass it from another class that contains this Xaml:
<local:ClassOne Title="example"/>
But it shows an empty label..
How can I pass the string as a xaml property to ClassOne's 'Title' string?

How to use the getActivity on my dialog fragment?

$
0
0

if (!input.equals("")){
((MainActivity)getActivity()).mInputDisplay.setText(input);
}
getDialog().dismiss();

I get how this thing works but, how can I translate these codes to c#?

What i want to happen is to throw the data from my dialog fragment to my MainActivity,

I get that code from watching this

image

And I know that i will also work if I apply this method on C#, but I don't know the correct codes.

Thanks in advace :)

App Crashes With "Android.Content.Res.Resources+NotFoundException: Unable to find resource ID #0x1"

$
0
0

Please help on this exception I'm getting.

I have been all over my project the whole day but cannot yet figure out why I'm getting this exception. It's basically saying that some resource is not found but it's not telling which resource exactly. It's maddening since I'm using over 100 images.

Android.Content.Res.Resources+NotFoundException: Unable to find resource ID #0x1
at android.content.res.Resources$NotFoundException: Unable to find resource ID #0x1
at at android.content.res.Resources.getResourceName(Resources.java:2235)
at at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1059)
at at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742)
at at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
at at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:570)
at at mono.java.lang.RunnableImplementor.n_run(Native Method)
at at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)
at at android.os.Handler.handleCallback(Handler.java:739)
at at android.os.Handler.dispatchMessage(Handler.java:95)
at at android.os.Looper.loop(Looper.java:148)
at at android.app.ActivityThread.main(ActivityThread.java:5487)
at at java.lang.reflect.Method.invoke(Native Method)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:765)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:655)

Cannot connect debugger after update 03/06/2018

$
0
0

Hello!

Just updated VS Mac + Xamarin.iOS|Android|Mac + Mono.
Now cannot launch my iOS app on simulator.
Project is successfully build, deployed, and app is being started (on simulator) but after 1-2 seconds stops.

Here is my VisualStudio info

=== Visual Studio Enterprise 2017 for Mac ===

Version 7.4 (build 1033)
Installation UUID: c7c52c13-ff7a-4f7e-97b8-78f989191d64
Runtime:
Mono 5.8.0.129 (2017-10/835a98d8559) (64-bit)
GTK+ 2.24.23 (Raleigh theme)

Package version: 508000129

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.0.5
2.0.0
SDK: /usr/local/share/dotnet/sdk/2.1.4/Sdks
SDK Versions:
2.1.4
2.0.0
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.8.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.6.1
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.2 (13772)
Build 9C40b

=== Xamarin.Android ===

Version: 8.2.0.15 (Visual Studio Enterprise)
Android SDK: /Users/*/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
6.0 (API level 23)
7.1 (API level 25)

SDK Tools Version: 25.1.2
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

=== Xamarin.Mac ===

Version: 4.2.0.20 (Visual Studio Enterprise)

=== Xamarin.iOS ===

Version: 11.8.0.20 (Visual Studio Enterprise)
Hash: 1c6f300e
Branch: d15-6
Build date: 2018-02-07 23:42:40-0500

=== Xamarin Inspector ===

Version: 1.4.0
Hash: b3f92f9
Branch: master
Build date: Fri, 19 Jan 2018 22:00:34 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 704001033
Git revision: 053991068f3c88497d3e5cc52fe7fdf57c28b62f
Build date: 2018-02-28 05:02:28-05
Xamarin addins: cc3283953e0af0b8bfab1bdfdf847d9e403c4606
Build lane: monodevelop-lion-d15-6

=== Operating System ===

Mac OS X 10.13.3
Darwin 17.4.0 Darwin Kernel Version 17.4.0
Sun Dec 17 09:19:54 PST 2017
root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Prism Template Pack 2.0.0
Internet of Things (IoT) development (Preview) 7.1

System restart and project clean/rebuild didn't help.
Any ideas =) ?

Viewing all 204402 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>