PhpStorm doesn't see any android devices - react-native

Now command npx react-native run-android work in Windows command line, but when I try call it in PhpStorm Terminal:
"adb" ­Ґ пў«пҐвбп ў­гв७­Ґ© Ё«Ё ў­Ґи­Ґ©
Є®¬ ­¤®©, ЁбЇ®«­пҐ¬®© Їа®Ја ¬¬®© Ё«Ё Ї ЄҐв­л¬ д ©«®¬.
info Launching emulator...
info Installing the app...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
Before I reinstalled Windows, it worked fine. I don't understand what I forgot to configure. Where could be the problem?

I just reinstall IDE and problem went away.

Probably it's too late but it may still help others.
"adb" ­Ґ пў«пҐвбп ў­гв७­Ґ© Ё«Ё ў­Ґи­Ґ©
Є®¬ ­¤®©, ЁбЇ®«­пҐ¬®© Їа®Ја ¬¬®© Ё«Ё Ї ЄҐв­л¬ д ©«®¬.
Is actually a Russian equivalent of
'adb' is not recognized as an internal or external command, operable program or batch file
affected by some encoding issues.
It means that you need to add the path to your adb file to the System PATH variable and then restart the IDE.
adb should be located in the platform-tools folder of your android SDK.

Related

My UIautomator is not starting in mac. I have done everything possible

I am learning appium and I have set up everything that is required. I have setup paths, installed android studio, run appium and created a virtual android device too. But when i am writing uiautomatorviewer its giving me an error
mac#Macs-MacBook-Pro ~ % uiautomatorviewer
-Djava.ext.dirs=/Users/mac/Library/Android/sdk/tools/lib/x86_64:/Users/mac/Library/Android/sdk/tools/lib is not supported. Use -classpath instead.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
mac#Macs-MacBook-Pro ~ %
Can anyone help me please
A. I encountered this issue once, sometime env var doesn't load and it throws error, open and load bash profile and run that command.
open ~/.bash_profile
source ~/.bash_profile
uiautomatorviewer
B. if appium server is running, try to close it and run the command.
Try the following command:
sudo ./uiautomatorviewer

Test instrumentation process crashed - where is the .txt file?

Sometimes, while Espresso testing, I see the following exception.
Test instrumentation process crashed. Check package_name.TestName#methodName.txt for details
Where is this .txt file stored? I can't seem to find it anywhere.
Use Case
In Jenkins (CI), I want the logs to see exactly what stacktrace caused the crash.
If you are working with an emulator, in A.S open Device File Explorer and go to:
/data/user_de/0/android.support.test.orchestrator/files/, then you can look for a particular file there
EDIT: June 25 - 2019 >> If you have updated to AndroidX dependencies, then the .txt file is located in
/data/user_de/0/androidx.test.orchestrator/files/
In my case, it was simpler to just check Logcat, rather than listen to that recommendation
For others encountering this issue, as #antek pointed out the files might not be accessible on a non-rooted device. You might try using an emulator running a non-Google Play API where you can obtain a root shell.
adb root
adb shell
ls /data/data/androidx.test.orchestrator/files
Alternatively, you could try running the tests using the debugger.
I could not find the text file, but I was able to get logcat and view the fatal that caused the orchestrator to crash
first I clear the logcat
adb logcat -c
then I run the test, then I grab the logcat
adb logcat > ~/Desktop/logcat
then I open logcat file and search for string FATAL
I just did wipe data in Android studio for my emulator using Device manager.
Restarted the emulator and run the test works for me

react-native run-android randomly not able to delete or create folder

I am running on Windows 10:
Permission to the folder is Everyone & Full Access.
Cmd line is set to Administrator.
--version react-native-cli: 2.0.1
--version react-native: 0.47.2
* What went wrong:
Execution failed for task ':#myApp/react-native-spinkit:mergeReleaseResources'.
> java.io.IOException: Could not delete path 'C:\Users\My\Desktop\App\node_modules\#myApp
\react-native-spinkit\android\build\intermediates\res\merged\release\drawable-xhdpi-v4'.
For example, I will get the error above. Sometimes it says could not delete some intermediate path, sometimes, it says it could not create them.
It is not a fixed error output, intermediate folders that got into trouble is different every time. When I repeat React-native run-android on the good days 2-3 times, it will compile successfully. On the bad days I will repeat the cmd 10-15 times, then it suddenly works.
By the way, I use android/gradlew clean command to make sure it does the cleaning, too.
One thing I noticed is that every time it fails the compile percentage % gets a bit further. Until the end if I see 100% then it will work.
The same code compiles in one go with Mac, android physical or virtual machine, same thing on Mac is very stable. This problem only happens with my Windows setup. Anyone experiencing the same thing as me? Is there anything I can do to fix this issue?
You can try this: Error:Execution failed for task ':app:processDebugResources'. > java.io.IOException: Could not delete folder "" in android studio
Deleting the /build folder did it for me.
I guess some of the files in the target build directory is open in another tool you use. Just a file handle open in the folder which has to be cleaned. The build task 'clean' wants to delete all the files in the build directory(normally 'target') and when it fails, the build fails.
This worked for me:
cd ./android && ./gradlew app:assembleDebug && ./gradlew installDebug

Archived App not working. Run from XCODE successful

I have made an app with swift which is working when I run it from XCODE. However, when i try to archive it and run the .app, it will not start.
How can I check why the app is crashing/not starting? What can be the reasons?
This is what the console output if I enter the packe and start it from the folder Contents/MACOs
Mislavs-MBP:~ proslav$ /Users/proslav/Desktop/trackingCore.app/Contents/MacOS
/trackingCore ; exit;
dyld: Library not loaded: #rpath/SQLite.framework/Versions/A/SQLite
Referenced from: /Users/proslav/Desktop/trackingCore.app/Contents/MacOS
/trackingCore
Reason: image not found
Trace/BPT trap: 5
logout
running it from the terminal gives the following output
LSOpenURLsWithRole() failed with error -10810 for the file /Users/proslav
/Desktop/trackingCore.app.
I have added a framework https://github.com/stephencelis/SQLite.swift to access a SQLite database. That is the library that is not loaded although it exists in the .app
I found the answer. In the copy files i was linking to resources instead of frameworks. It seemed to be no problem for run but it was for archving.
Anyone arriving here based on the title, note that Xcode OSx builds are broken now.
https://developer.apple.com/library/mac/qa/qa1884/_index.html
They recommend using command line tools;
$ productbuild --component Sample.app /Applications --sign “3rd Party Mac Developer Installer:" Sample.pkg
$ sudo installer -store -pkg Sample.pkg -target /

calabash-android block in start_test_server_in_background

I've been trying to troubleshoot the issue I am having after I changed my computer with getting .apk file to run properly. I have read all the various solutions, but none worked so far.
I continue to get this error can can't figure out why:
Starting calabash-android console...
Loading /Users/sasaro/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/calabash-android-0.5.2/irbrc
Running irb...
irb(main):001:0> start_test_server_in_background
RuntimeError: App did not start
from /Users/sasaro/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/calabash-android-0.5.2/lib/calabash-android/operations.rb:609:in block in start_test_server_in_background'
from /Users/sasaro/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/retriable-1.3.3.1/lib/retriable/retriable.rb:31:inperform'
from /Users/sasaro/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/retriable-1.3.3.1/lib/retriable/retriable.rb:59:in retriable'
from /Users/sasaro/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/calabash-android-0.5.2/lib/calabash-android/operations.rb:608:instart_test_server_in_background'
from /Users/sasaro/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/calabash-android-0.5.2/lib/calabash-android/operations.rb:125:in start_test_server_in_background'
from (irb):1
from /Users/sasaro/.rvm/rubies/ruby-2.1.2/bin/irb:11:in'
What am I doing wrong? What am I not seeing? Is there a solution?
On Mac OS X 10.9.4. The app get's reinstalled when I run reinstall_apps, and when I run start_test_server_in_background I see the app open in the emulator. But, then I get the above error. The app is still usable and running in the emulator.
I'm new at calabash install so please be gentle and detailed if you have come across anything like this.
Try running this command:
calabash-android resign path/to/file.apk
Delete all Test_Server, delete android app from folder and copy new one after that
Try to:
calabash-android console app-debug.apk
irb> reinstall_apps
irb> start_test_server_in_background
it should start
and after that if it wont recognise server try calabash-android resign app-debug.apk
and calbash-android run app-debug.apk
Delete the test_server folder and resign your apk file
calabash-android resign path/to/file.apk
Then open the console
calabash-android console path/to/file.apk
and
reinstall app by typing
reinstall_apps
then start your app
start_test_server_in_background