01 August, 2020

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

No comments:

Post a Comment

Microservices vs Monolithic Architecture

 Microservices vs Monolithic Architecture Here’s a clear side-by-side comparison between Microservices and Monolithic architectures — fro...