Deployment only works with Samsung J5 smartphone plugged into the computer

Asked

Viewed 48 times

0

I can only do implantation when my cell is plugged into my note. If I use the pattern(VisualStudio_android-23_arm_phone(Android 6.0 - API23)), does not work. Build successfully, but deployment fails. I don’t know why. I haven’t tried with other models. In my Visual only comes this option(VisualStudio_android-23_arm_phone(Android 6.0 - API23)).I can not load another option in VS and Android project settings (My project is Cross Platform), I used as target version a Lollipop(Android 5.1 API 22). My Android configuration: inserir a descrição da imagem aqui

My App.xaml.Cs

namespace Teste2
{
    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();

            //MainPage = new Teste2.MainPage();
            MainPage = new NavigationPage(new Teste2.MainPage());
        }

        protected override void OnStart()
        {
            // Handle when your app starts
        }

        protected override void OnSleep()
        {
            // Handle when your app sleeps
        }

        protected override void OnResume()
        {
            // Handle when your app resumes
        }
    }

And my Mainpage.xaml.Cs

public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();
        }
    }

My Mainpage.xaml:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:Teste2"
             x:Class="Teste2.MainPage">

    <StackLayout Orientation="Vertical">
        <StackLayout Padding="5,5,0,0">
            <Label Text="Adicionar um Produto" TextColor="Green" />
        </StackLayout>
        <StackLayout Padding="10,0,10,0">
            <Entry x:Name="txtNome" Placeholder="Nome do produto" HorizontalOptions="Start" 
                    VerticalOptions="StartAndExpand" HeightRequest="30" WidthRequest="300" FontSize="Small"/>
            <Entry x:Name="txtCategoria" Placeholder="Categoria do produto" HorizontalOptions="Start" 
                    VerticalOptions="StartAndExpand" HeightRequest="30" WidthRequest="300" FontSize="Small" />
            <Entry x:Name="txtPreco" Placeholder="Preço do produto" HorizontalOptions="Start" VerticalOptions="StartAndExpand" 
                    HeightRequest="30" WidthRequest="300" FontSize="Small" />
            <Button HorizontalOptions="FillAndExpand" VerticalOptions="StartAndExpand" HeightRequest="40" Text="Adicionar/Atualizar Produto" 
                    Clicked="btnAdicionar_Clicked" FontSize="Small"/>
        </StackLayout>

        <!--<StackLayout Orientation="Vertical" Padding="10,5,10,0">
            <ListView x:Name="listaProdutos" ItemSelected="listaProdutos_ItemSelected" BackgroundColor="Aqua" SeparatorColor="Blue">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <ViewCell.ContextActions>
                                <MenuItem Clicked="OnAtualizar" CommandParameter="{Binding .}" Text="Atualizar" />
                                <MenuItem Clicked="OnDeletar" CommandParameter="{Binding .}" Text="Deletar" IsDestructive="True" />
                            </ViewCell.ContextActions>
                            <StackLayout Padding="10,10" Orientation="Horizontal">
                                <Label Text="{Binding Nome}" HorizontalOptions="StartAndExpand"/>
                                <Label Text="{Binding Categoria}" TextColor="Blue" HorizontalOptions="Center"/>
                                <Label Text="{Binding Preco}" HorizontalOptions="End"/>
                            </StackLayout>
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </StackLayout>-->
    </StackLayout>

</ContentPage>

EDIT1

Reading the generated warnings, it says that there is a version conflict of the installed packages. I tried to install the packages, which was suggested to me in the Nuget update tab and is giving this problem. Interesting that earlier asked me this package: Microsoft.Bcl.Build and installed and when I closed and opened VS, the reference is gone, but the package is in the folder Package(case 1). Installing the others did not conflict with the installation, but when I run the application, comes the conflict (case 2).

That way the deployment with the default AVD does not work, but if I connect my cel works.

EDIT2

This is the message that comes when I spin. It builds normally, but when deploying it sticks and the message is just a Warning: inserir a descrição da imagem aqui

EDIT3

I updated the version of destination (I had already done this) and now gave this Warning and no deployment: inserir a descrição da imagem aqui

  • Where do I see the build log? But if it’s my cell connected (Samsung J5), it works, but I can’t see the components inserted in the project.

  • I decided to leave the run for a long time, and after about 8 minutes, came the message that Android is not responding. Do you want to stop or continue? I let it continue. If I’m listening to music, while the App is running, I can’t stop the music, move on to the next one, nothing. The control is all with the App, but the music does not stop and when it finishes the next one runs normally. I am writing this, just as a subsidy for the resolution of this problem.

  • The question had received a vote and now was without. I do not believe that the colleague who voted, removed the vote. A few days ago I disagreed with two colleagues here on the site and since then, coincidence or not, all my questions have received downvote, regardless of whether the question is within the rules. Girl thing that.

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.