Could someone help me with the issue? I added in my project allure-kotlin for androidTests, and when I run them via command line: ./gradlew connectedEnvstageDebugAndroidTest folder "allure-results" in the android emulator doesn't exist.
Also, I created this folder manually and ran it again results were the same.
BUT, when I run any test via IntelliJ Idea (via "run" button), folder generating and report exists. And if I'll run tests via command line report will be generated as well, but just after when I'll run a test via the "run" button.
Could someone help me with it?
Thank you in advance!
Related
I am looking to setup automated end to end UI testing for React Native App and its my first time doing it using detox.
I followed exact steps as mentioned in this article:
https://varunon9.medium.com/e2e-testing-of-react-native-app-android-using-detox-a-step-by-step-guide-bfb520c1a9ac
But every time I try to run build command i.e: detox build -c android.emu.debug. I get the following error:
[Here is the console log from when I run the command]
[1]: https://i.stack.imgur.com/zbLlO.png
Any help would be greatly appreciated
I was able to solve this. It was a stupid mistake instead of ./gradlew in build command I was supposed to use just gradlew as that's how the file was saved inside my android folder of the project
I'm a developer developing react-native using VSC on Windows. The build succeeds, but it turns out not to run
The react-native run-android command printed BUILD SUCCESSFUL.
But unfortunately in the next line
Access is denied.
With only a message, the app is installed on the device, but it doesn't run. When I run it, I see the make sure blabla error screen that appears when there is no node server.
This problem eliminated my two days.
I want to get help.
Ps. Note that project asd is a new project for testing. If you look at the existing project and test project, I guess it might be Java configuration, but ... I am suffering because there is no proper solution.
When running a unit test from within Android Studio on a mac, I can manually run it 1 time, then it fails with the error "Could not execute build using Gradle distribution 'https://services.gadles.org/distributions/gradle-4.10-all.zip'".
I can run it again by deleting my .gradle folder and restarting Android Studio, but this isn't sustainable for testing.
When running the unit test manually with ./gradlew, it works every time but that doesn't lend itself well to debugging.
This applies to even the most simple of tests.
Wanted to add specific error message from the Build tab. This happens on a simple test, with the first time running it working, and the second time running it not working:
#Test
fun testTrue(){
assertTrue(true)
}
FAILURE: Build failed with an exception.
* What went wrong:
java.lang.NullPointerException (no error message)
So, I have a suspect that could be the cause, and a hack that makes it work in the short term.
First, the hack. As many other people have answered, deleting the .gradle folder resolves the issue for me temporarily. However, that is a bit over overkill and forces a complete build every time you run it.
You can get around this partially by deleting just the fileHashes.bin and fileHashes.lock file in .gradle/4.7/fileHashes folder. I wrote a quick script to delete those two files and edited the "Android JUnit" Template in "Run/Debug Configurations" to run that script before every junit run. See screenshot for details, but you'll need to make sure it is the first thing that runs. (Drag it to the first)
The .bsh file is an executable which just deletes those two files.
#!/bin/bash
echo This script deletes the .gradle files necessary for my android studio to work
cd wealth-android/.gradle/4.7/fileHashes
rm fileHashes.*
Now, the real problem may be that I could have multiple implementations of gradle on my machine. I'll look into that more and update the answer.
I was always able to build from this project, this just started happening this morning. When I run ionic build android everything runs smoothly and the build succeeds, but the date modified on the android-debug.apk file stays the same, and I don't see my changes when I run it on a device.
Could it have something to do with messed up permissions and somehow it doesn't have permission to write the apk? I'm running Ubuntu-server 14.04.4.
I know it's been answered before but I'm adding this to let you guys know what I've tried and how it's not working anyways...
I've also faced same issue and tried several things like
Renaming APK file, expecting it will create new one.
Deleting build folder, expecting as usual will create new one.
opening project in Android studio, expecting it will create new one when I use it to launch the APK to device.
I've tried calling ionic prepare platform before calling ionic build.
The ionic build is a proxy for cordova build command.
But in this issue all of above approaches were failed.
The reason I can see behind this is because of no proper response/function of added platform to your project, as when you build it's cordova platform android's responsibility to prepare build on your command. Which is not working.
Lot of people suggests that You need to us ionic/cordova restore, this will restore your state.
Another way is you can use Android Studio's build APK option which helps you not to disturb your plugins by restore or reset commands.
Hope this helps you save your time from trying all these approaches.
Could it that you are looking at a wrong place?
When build command is successfully finished you should see smth like below in console
Built the following apk(s):
<PATH_TO_YOUR_SOURCES>/platforms/android/build/outputs/apk/android-debug.apk
Are you checking this this location?
Okay so the problem isn't with Ionic, it's just that the changed files aren't showing up in the ftp for some reason. So now I will try and figure that out.
As suggested by #mobileevangelist , ionic cordova restore can be done using command
ionic cordova prepare
It fixed my problem.
Try to
Open Android Studio
Choose Import project
Select YourProjectDirectory/platforms/android folder
Choose Build -> Build APK
I recently switched from Eclipse to Android Studio because I read that it is now the official IDE for Android application development. I downloaded and installed the latest version (1.0.2) for Windows. When using the program for the first time, I decided to create a test application to see if the program was working correctly. Unfortunately, it was not. Once I clicked the finish button to complete the New Project Wizard, A loading bar showed up that said Gradle: Build. This is where the program gets stuck. There is no error message and it appears that the program is running fine, however the build never actually completes. I am never given my MainActivity.Java class, or my activitymain.xml document. If I click the cancel button, the program freezes and I have to use the TaskManager to kill the program. If I re-enter the program and choose to open an existing project, my project will be there. However, upon trying to open the project, I am greeted with the same Gradle: Build loading bar.. I have been searching for an answer for the last 3 days and nothing has worked. Any help is greatly appreciated!
Things I have tried:
Simply letting the program sit for a while to see if it was actually downloading something and was just really slow. I let it sit for 45+ minutes before killing the program.
Uninstalling and re-installing Android Studio
Restarting my computer
Turning off my firewall (Kaspersky)
Running the program as an administrator
Connecting to a different network
Disconnecting my computer from any networks (to force the program to build in offline mode)
Manually downloading Gradle from the link that Android Studio attempts to use when it gets stuck and telling the program to use that file instead of downloading another one.
(I went to this link https://services.gradle.org/distributions/gradle-2.2.1-all.zip, downloaded the file, unzipped it, went to Gradle settings in Android Studio, checked the Offline work checkbox, and finally set the service directory path to my unzipped Gradle folder.)
Hopefully I have given enough information and made it clear what my problem is. If not please tell me what else I need to explain so I can get this issue resolved. Thanks!
Please note I am working on a 64 bit machine running Windows 8. Also, I use studio64.exe
to run the program.
From the discussion we had in the comments, it does not look like you have your gradle on your windows path.
Please change the below to point to your gradle install:
set GRADLE_HOME=C:\<installation location>\gradle-1.11
set PATH=%PATH%;%GRADLE_HOME%\bin
After this, verify that in the terminal running the following works:
gradle tasks
once you get this working, you will want to run the following in your project:
gradle wrapper
This will produce a .bat file which you can then use to run gradle through the wrapper, letting you support multiple native gradle installations.