Comments (10)
ImageViewAsync has two constructors:
public ImageViewAsync(Context context, SizeF? predefinedSize=null)
public ImageViewAsync(Context context, IAttributeSet attrs, SizeF? predefinedSize=null)
I believe that is why you have this issue: there is no constructor with the signature:
System.IntPtr, Android.Runtime.JniHandleOwnership
Could you paste some code here or attach a zip file of your solution?
from ffimageloading.
I'm completely new to Xamarin, but here is my code:
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using RestSharp;
using FFImageLoading;
using FFImageLoading.Views;
using FFImageLoading.Helpers;
using FFImageLoading.Extensions;
namespace SimpleshopApp
{
[Activity (Label = "SimpleshopApp", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
{
int count = 1;
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);
// Get our button from the layout resource,
// and attach an event to it
Button button = FindViewById<Button> (Resource.Id.myButton);
ImageViewAsync imgView = FindViewById<ImageViewAsync> (Resource.Id.imageView1);
var client = new RestClient ("http://xkcd.com/");
var request = new RestRequest (String.Format ("info.0.json"));
var asyncHandle = client.ExecuteAsync<Comic>(request, response => {
var img = response.Data.img;
Console.WriteLine(img);
});
button.Click += delegate {
button.Text = string.Format ("{0} clicks!", count++);
};
}
}
}
from ffimageloading.
Looks like this is a known issue of Xam.Android: http://stackoverflow.com/questions/26573627/no-constructor-found-for-system-intptr-android-runtime-jnihandleownership
Solutions seems to be simple: adding the other constructor and calling the base one.
This is what I just did: 22bed22
Do you have the possibility to test using master's sources?
I can make a new NuGet package once I get your confirmation.
from ffimageloading.
I'm not sure how to :(
from ffimageloading.
Don't worry I just made a prerelease NuGet package.
If you go in the Package console in Visual studio you can have it by executing
Install-Package Xam.Android.ImageLoading -Pre
from ffimageloading.
How to, in Xamarin Studio? :)
from ffimageloading.
In the Add Nuget package popup search for "imageloading" and tick "Show pre-release packages".
Then you can take the 1.0.2-beta
from ffimageloading.
Still throws the same error.
from ffimageloading.
My bad. I think that something went wrong and the nuget doesn't contain the latest changes.
I just removed bin/obj and made a new nuget which is now 1.0.3-beta
from ffimageloading.
Works perfectly now! Thanks!
from ffimageloading.
Related Issues (20)
- Check if Image Server side has changed from Cached version
- [Bug]In Xamarin.Forms (Android) throws System.ArgumentException in ImageService.SetTaskForTarget (FFImageLoading.Work.IImageLoaderTask currentTask).
- Support for image width/height query in the URL
- Some SVG images are displaying and some are not HOT 3
- CacheKeyFactory used in a CollectionView causes incorrect images to load.
- ReplaceStringMap Question
- Images from URL don't show at all on iOS in Xamarin Forms 5 app HOT 1
- For MAUI see here.... HOT 3
- Image Adjustments in Xamarin
- [ISSUE] [Android] GIF animation weird behavior
- App crashes after calling ImageService.SetTaskForTarget HOT 1
- Guid inside URL is changed
- .Net 6 support HOT 4
- Incomplete downloaded image is cached.
- Images disappear on Android after pressing the (hardware) Back button HOT 1
- .Net 8 support HOT 2
- RotateTransformation does not rotate images on iOS 17 HOT 1
- Image won't load in Maui Windows app
- Inquiry about Data Collection
- On windows image download fails randomly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffimageloading.