Skip to main content

React Native: Fix adb - device is offline error and Execution failed for task ':app:installDebug' and other

What went wrong: Android ADB device offline, can't issue commands


Easy to fix just follow the following steps:


Open CMD(command prompt) and below commands in order

  1. Kill the running ADB server using "adb kill-server"
  2. Start ADB server using "adb start-server"
  3. check running devices status using "adb devices"
  4. if your device is offline then run following this command "adb  reconnect device"


'ADB' is not recognized as an internal or external command, operable program or batch file


How to Fix It? 


Open cmd and run following command "PATH %PATH%;C:\Users\<user name here>\AppData\Local\Android\sdk\platform-tools"


Clean up you android build:

Try this one: 

cd android && ./gradlew clean 


What went wrong: Execution failed for task ':app:processDebugManifest'.

> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 24 declared in library [:react-native-ffmpeg] D:\Surya\learn\AwesomeProject\node_modules\react-native-ffmpeg\android\build\intermediates\library_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 16

        Suggestion: use a compatible library with a minSdk of at most 16,

                or increase this project's minSdk version to at least 24,

How to Fix It? 


Open build.dradle and update minSdkVersion =24 according to above suggestions


minSdkVersion


 What went wrong: Execution failed for task ':app:installDebug'.

    > com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Unknown failure: cmd: Can't find service: package


How to Fix It?

Just ran into the same error. In my case, the emulator was frozen. I had to go to AVD Manager in Android Studio and run "Cold Boot Now" on the specific emulator to get it back up, then this error went away.

Cold Boot Now




Error Message: ADB manager: unable to locate ADB

How to Fix It?


make sure the following options are selected and installed properly in Android SKD.
    SDK Tools Tabs: 
            make sure  the under Android SDK Build Tools >> 29.0.2 is checked

make sure  the under Android SDK Build Tools >> 29.0.2 is checked

SDK Platforms Tab>>Android 10.0(Q) is installed

SDK Platforms Tab>>Android 10.0(Q) is installed


Issue:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute data@scheme at AndroidManifest.xml requires a placeholder substitution but no value for <appAuthRedirectScheme> is provided


How to Fixe it?

some android build keeps cache based on the build just we need to fix it cleaning the android project with the following command

Window 10:  clean android project

run following commond: cd android && gradlew clean
Install React Native cli global: run the follwoing command
npm install -g react-native-cli

Comments

Popular posts from this blog

How to Make a Custom URL Shortener Using C# and .Net Core 3.1

C# and .Net Core 3.1:  Make a Custom URL Shortener Since a Random URL needs to be random and the intent is to generate short URLs that do not span more than 7 - 15 characters, the real thing is to make these short URLs random in real life too and not just a string that is used in the URLs Here is a simple clean approach to develop custom solutions Prerequisite:  Following are used in the demo.  VS CODE/VISUAL STUDIO 2019 or any Create one .Net Core Console Applications Install-Package Microsoft.AspNetCore -Version 2.2.0 Add a class file named ShortLink.cs and put this code: here we are creating two extension methods. public   static   class   ShortLink {      public   static   string   GetUrlChunk ( this   long   key ) =>            WebEncoders . Base64UrlEncode ( BitConverter . GetBytes ( key ));      public   static   long   GetKeyFromUrl ( this   string   urlChunk ) =>            BitConverter . ToInt64 ( WebEncoders . Base64UrlDecode ( urlChunk )); } Here is the Calling Sampl

Azure key vault with .net framework 4.8

Azure Key Vault  With .Net Framework 4.8 I was asked to migrate asp.net MVC 5 web application to Azure and I were looking for the key vault integrations and access all the secrete out from there. Azure Key Vault Config Builder Configuration builders for ASP.NET  are new in .NET Framework >=4.7.1 and .NET Core >=2.0 and allow for pulling settings from one or many sources. Config builders support a number of different sources like user secrets, environment variables and Azure Key Vault and also you can create your own config builder, to pull in configuration from your own configuration management system. Here I am going to demo Key Vault integrations with Asp.net MVC(download .net framework 4.8). You will find that it's magical, without code, changes how your app can read secretes from the key vault. Just you have to do the few configurations in your web config file. Prerequisite: Following resource are required to run/complete this demo ·         A

AWS FREE ASP.NET CORE (.NET 6.0) HOSTING WITH FREE SSL

  FREE ASP.NET CORE (.NET 6.0) Hosting on AWS (Amazon Web Services) Today I was able to host my asp.net 6.0  + ANGULAR 14 application  on AWS Free  Initial Setup of your AWS Account and your Computer Get ready with your asp.net core 3.1 /.net 6 application Install  "AWS toolkit for visual studio 2022" as  visual studio extensions :  it will be required to deploy smoothly from Visual Studio 2022 itself, your life will be easy. Let's finish the AWS account setup  Get signed up with: its free but it will be required a valid credit card or debit card, they will charge nothing for the free services for 1 year * https://portal.aws.amazon.com/billing/signup#/start/email AWS console  for services and offering http://console.aws.amazon.com/ Create a user in AWS Console:  IAM With the help of AWS Identity and Access Management (IAM), you can control who or what has access to the services and resources offered by AWS, centrally manage fine-grained permissions, and adjust permission