react-native: could not connect to development server on android - android

facing this error if I Reload or Debug JS Remotely. I tried all possible solutions mentioned in this SO question, But there was no use.
I have uninstalled and reinstalled the app, deleted node modules folder and then recreated, deleted total project and created new one. But nothing worked for me. As some one suggested in the above mentioned link, I tired to disable the firewall.it didn't work.Surprisingly it happened all of sudden. The only thing that I didn't tried formatting the system completely.
targetSdkVersion 26
Machine OS is Ubuntu
Developing for Android mobiles
react-native: 0.52.2
Using Chrome browser for debugging
tried in multiple mobiles and tablets, But same error is occurring. At the moment the only possible way to re-run the app is running react-native run-android every time code changes.
Could somebody help me to get rid of this error?
Thank You.

Related

Xamarin no longer debugging my app

I've been working on a Xamarin project for a few days and have been testing it fine, but today it has suddenly stopped allowing me to debug the app, either via Live Player, or by connecting my smart phone via USB.
The only error I am getting, as far as I can see, is
Failed to debug your app
I've not got a way of testing it on iOS devices, but the built-in Windows Phone emulator runs the app fine, albeit with an error in my code popping up now and then.
What could be causing the Android version to stop debugging, or how do I at least fix it?
There are a couple of steps that can help with that issue:
Clean the solution and exit visual studio
manually delete the .vs folder in your solution directory
Delete the /obj and /bin folders in your shared code, and in each project for the platforms you are using
if you are developing for iOS, sometimes it helps to restart your mac
Start Visual Studio
Rebuild your shared code project
Rebuild every native project
Beyond that also make sure that you are using the latest versions of Visual Studio, Xamarin and Xamarin.Forms on all your computers, and that the nuGet Packages your project is using are at the very same version each in shared and native code
Also check, if your app isn't throwing an unexpected exception during its initialization. Especially if not caught, it can happen that your app crashes before your code gets executed at all.
In addition you may find further information about what is going on at Help -> Xamarin -> Open logs or in the device management in XCode (iOS only)
Try this :
Close visual studio if open.
Open App Data and then go to
(a) Local\Xamarin
(B) Local\Xamarin\Xamarin.Android
Empty these folders.
Open your project and then try to build your application.
Not a proper solution, but I uninstalled and reinstalled Visual Studio. This seems to have fixed the problem, but I've still no idea why it stopped working in the first place.

Android device version of React-Native project isn't updated, even though simulator is

I have a very strange phenomenon with React-Native. I have been working with the iOS simulator mainly but wanted to test my code on my Android phone, a Huawei Nexus 6P. Even after removing the old app from the 6P an older version of my code is run. Yes, I have updated index.android.js to match index.ios.js and, to prove it should work, a Genymotion simulator of the 6P runs the correct code.
I even tested a Kotlin Android project I'm building and when I ran that on my 6P any updates to the code were shown as expected.
I will also mention, though it's probably not relevant, I recently (before this problem) had a separate issue that lead me to run sudo ./gradlew clean after CDing into the Android folder of my project as described in this answer. That didn't fix my issue but I wonder has it somehow 'corrupted' Gradle for my project? Is there a way I can 're-init' or something?
I'm really struggling to understand what could be wrong here, especially since the simulator is updated correctly. Any help is welcome!
UPDATE:
After a helpful tip to clear the cache of the app from bennygenel I did the following and reran react-native run-android but sadly I still have the same problem:
Cleared Cache for the App
Cleared the Data
Force Stopped the App
Uninstalled the App
This is very odd indeed!

Android studio running app on Huawei G700 hangs at Uploading file

I know Android Studio is currently in beta, but still maybe somebody has a solution to this. Similar to Android studio running app on Samsung Galaxy S3 hangs at Uploading file I have issues when trying to run my app. It doesn't actually matter if its the physical phone or the android emulator.
I've tried with my app and a new empty project: same result. After compilation it tries to upload the app and just gets stuck. I've tried re-installation of Androidstudio and rebooting. Fun fact: on my laptop everything works just fine.
Any more ideas would be appreciated.
So actually it looks like something with the Platform tools was going wrong. A delete and install in the SDK Manager solved my issue. Weird, that the tools coming with the studio bundle are broken on my system.
Go to build and Rebuild your project. It will solve the problem.

INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES error in PhoneGap

I have made a PhoneGap/Cordova based application, that seems to work fine when tested with Chrome + Ripple.
When I'm trying to install it to my Android device(which is ADB configured, and shows up in Eclipse SDK), I get the INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES error.
By reading existing posts on the same issue, I understand that it has to deal with re-installation of the app.
But, this is the first time I am trying to run this app on any device, and I don't see how re-installing might solve the problem.
Any advice on resolving the error would be much appreciated.
Look for another app in settings->apps->downloaded that may have the same package name and uninstall it.

Reinstalling Android SDK doesn't work after encountering Android emulator error

I recently completed my first, very basic Android application however when debugging and testing I encountered what seems to be a very common problem. Eclipse and the emulator were giving me a similar problem to this emulator.exe has stop working?, and then after trying the recommended solutions I started receiving errors similar to this Android Emulator won't run application started from eclipse and receiving errors in Eclipse saying this:
adb is running normally.
Performing 'activity' activity launch
Automatic Target Mode: Preferred AVD 'TestAVD' is not available. Launching new emulator.
Launching a new emulator with Virtual Device 'TestAVD'
emulator: warning: opening audio input failed
None of the solutions I found worked unfortunately. Worked as in I was able to run my application in an emulator at all. So I decided to uninstall and reinstall the Android SDK. I followed the instructions in both a Beginning Android Programming book and the ones provided on the official Android website but to no avail. From the last time I downloaded the SDK, the Android SDK Manager is newly updated although appears to install correctly with no new errors. Also reinstalling the ADT in Eclipse seems to go smoothly. However I've noticed that when I now go to recreate a new Android project, it creates it differently to what the website and my book describes. The most prominent difference being that in my drawable folder, there is only an "ic_launcher.png" as opposed to having three folders for ldpi, mdpi abd hdpi. The AndroidManifest.xml also does not recognise android:targetSdkVersion or android:installLocation anymore saying there is no resource identified found. Another major problem is in my MultiTouchHandler class, MotionEvent variables such as ACTION_MASK or ACTION_POINT_ID_SHIFT for example, have the error cannot be resolved or is not a field. Before I uninstalled everything, these things worked perfectly and the application encountered no errors. The app worked!! Upon reinstalling everything, and moving my application into a new project to fix the initial problem, nothing works anymore.
I have googled and searched these forums for a good few days and all the solutions that have been suggested have not worked for me. I have uninstalled and reinstalled and redownloaded the SDK's I don't know how many times and I really don't want to give up on developing for the Android.. but I just can't seem to find a solution. Sorry for the lengthy post but I wanted to be thorough! Any help would be very much appreciated! Thank you!

Categories

Resources