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
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
CLI: 6.1.0
Cross-platform modules: 6.1.0
Android Runtime: 6.1.0
Describe the bug
When using Kotlin jar file included in the App_Resources/Android/libs folder and App_Resources/Android/gradle.properties is added with the following content:
useKotlin=true
It may cause the app to crash when you run tns run android with:
Gradle build...
+ setting applicationId
+ applying user-defined configuration from /Users/trifonov/Work/tmp/test/app/App_Resources/Android/app.gradle
+ using android X library androidx.legacy:legacy-support-v4:1.0.0
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: /Users/trifonov/Work/tmp/test/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar
Exception in thread "main" java.lang.RuntimeException: Class not found OnNavigationItemReselectedListener
at org.nativescript.staticbindinggenerator.Generator.getClass(Generator.java:549)
at org.nativescript.staticbindinggenerator.Generator.getInterfacesFromCache(Generator.java:532)
at org.nativescript.staticbindinggenerator.Generator.writeBinding(Generator.java:283)
at org.nativescript.staticbindinggenerator.Generator.generateBinding(Generator.java:171)
at org.nativescript.staticbindinggenerator.Generator.processRows(Generator.java:234)
at org.nativescript.staticbindinggenerator.Generator.generateBindings(Generator.java:121)
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:97)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:53)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:runSbg'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
* 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 17s
Command ./gradlew failed with exit code 1
This is happening not on every machine, seems that it more often happens on machines with more CPU cores.
The cause of the problem above is that for some reason the buildMetadata task is executed after the mergeDebugAssets task and thus the generated metadata files will be missing in the result apk file and this will cause the application to crash.
The text was updated successfully, but these errors were encountered:
vtrifonov
changed the title
When using kotlin it may happen that the metadata is not existing in the result apk
When using kotlin sometimes the metadata is not existing in the result apk
Sep 11, 2019
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):Describe the bug
When using Kotlin jar file included in the
App_Resources/Android/libs
folder andApp_Resources/Android/gradle.properties
is added with the following content:It may cause the app to crash when you run
tns run android
with:This is happening not on every machine, seems that it more often happens on machines with more CPU cores.
The cause of the problem above is that for some reason the buildMetadata task is executed after the mergeDebugAssets task and thus the generated metadata files will be missing in the result apk file and this will cause the application to crash.
The text was updated successfully, but these errors were encountered: