You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i try run app by using npx detox build -c android.emu.debug --stacktrace, I encounter problem with references:
Detox, config, DetoxConfig in DetoxTest.kt.
buildscript {
repositories {
gradlePluginPortal()
google()
mavenCentral()
maven("../node_modules/detox/Detox-android") //detox is configured in ../root so node_modules is under path like specified in maven()
maven("../node_modules/jsc-android/dist")
maven("../node_modules/detox/Detox-android")
}
dependencies {
classpath("com.google.gms:google-services:4.3.14")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20")
}
}
plugins {
id("com.android.application") version "7.3.1" apply false
id("com.android.library") version "7.3.1" apply false// There is no updated Kotlin plugin for 1.7.21 yet
id("org.jetbrains.kotlin.android") version "1.7.20" apply false
id("org.jetbrains.kotlin.jvm") version "1.7.20" apply false// Currently there's an issue with Android Studio Dolphin | 2021.3.1 Patch 1, bump Hilt version when resolved
id("com.google.dagger.hilt.android") version "2.42" apply false
}
const val detox = "com.wix:detox:+"
const val appcompat = "androidx.appcompat:appcompat:1.1.0"
What i noticed also that:
i have not those classes in External Libraries, Gradle:com.wix:detox:0.1.1@aar in com.wix.detox module, I have imported detox like this import com.wix.detox.Detox
Output:
npx detox build -c android.emu.debug --stacktrace
cd android ; ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug ; cd -
> Task :app:compileDebugAndroidTestKotlin FAILED
e: /Users/nname/Desktop/herearetests/android/app/src/androidTest/java/com/com.xxx.android/DetoxTest.kt: (3, 22): Unresolved reference: Detox
e: /Users/nname/Desktop/herearetests/android/app/src/androidTest/java/com/com.xxx.android/DetoxTest.kt: (4, 22): Unresolved reference: config
e: /Users/nname/Desktop/herearetests/android/app/src/androidTest/java/com/com.xxx.android/DetoxTest.kt: (21, 27): Unresolved reference: DetoxConfig
e: /Users/nname/Desktop/herearetests/android/app/src/androidTest/java/com/com.xxx.android/DetoxTest.kt: (22, 38): Variable expected
e: /Users/nname/Desktop/herearetests/android/app/src/androidTest/java/com/com.xxx.android/DetoxTest.kt: (23, 38): Variable expected
e: /Users/nname/Desktop/herearetests/android/app/src/androidTest/java/com/com.xxx.android/DetoxTest.kt: (24, 21): Variable expected
e: /Users/nname/Desktop/herearetests/android/app/src/androidTest/java/com/com.xxx.android/DetoxTest.kt: (25, 9): Unresolved reference: Detox
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugAndroidTestKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
132 actionable tasks: 1 executed, 131 up-to-date
/Users/nname/Desktop/xxx_detox
user@MacBook-Pro-Name xxx_detox %
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugAndroidTestKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
<img width="690" alt="Zrzut ekranu 2023-02-2 o 15 41 53" src="https://user-images.githubusercontent.com/91880075/216355094-7251db72-3531-4fa3-8674-79562ea48284.png">
File structure:
What was the expected behaviour?
No response
Was it tested on latest Detox?
I have tested this issue on the latest Detox release and it still reproduces.
jstawow
changed the title
Native Android: kotlin: unresolved reference Unresolved reference: Detox, config, DetoxConfig in DetoxTest.kt while building app.
Native Android: kotlin: Unresolved reference: Detox, config, DetoxConfig in DetoxTest.kt while building app.
Feb 2, 2023
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions!
For more information on bots in this repository, read this discussion.
it is not like detox does not work with android native application ??
Oh geez. Thanks for pointing that out. You are perfectly right in that we don't properly support pure-native android and that I should stop working late nights 😅
What happened?
When i try run app by using
npx detox build -c android.emu.debug --stacktrace
, I encounter problem with references:Detox, config, DetoxConfig in DetoxTest.kt.
I have added following changes:
app/build.gradle.kts:
main/build.gradle.kts:
app/src/androidTest/java/com/com.xxx.android/DetoxTest.kt
app/src/main/res/xml/network_security_config.xml
buildSrc/src/main/kotlin/Deps.kt
What i noticed also that:
![Zrzut ekranu 2023-02-2 o 15 19 28](https://user-images.githubusercontent.com/91880075/216349780-31700d3f-b1a3-43e2-b4b6-b6509b988cd3.png)
i have not those classes in External Libraries, Gradle:com.wix:detox:0.1.1@aar in com.wix.detox module, I have imported detox like this import com.wix.detox.Detox
Output:
File structure:
What was the expected behaviour?
No response
Was it tested on latest Detox?
Did your test throw out a timeout?
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version:
Kotlin:1.7.20
Node version: v14.17.6
Device model: Pixel XL API 28
Android version: 9
Test-runner (select one): jest
Detox logs
Detox logs
Device logs
Device logs
More data, please!
No response
The text was updated successfully, but these errors were encountered: