If it says “Failed” just try again, it’ll normally resolved… From my experiences. On the other hand, is your project empty?
The problem is with your JDK installation. You don’t have any version of JDK installed on your system. Download and install JDK 8 and try again.
can we use kotlin and java both together?
Already answered here
Already answered here
ok thx
Is there a problem installing the latest java or it has to be 8.x
An error…
Microsoft Windows [Version 10.0.18363.1556]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\user\Desktop\Rush codes\tasks>rush build
__
_______ _______/ /_
/ ___/ / / / ___/ __ \
/ / / /_/ (__ / / / /
/_/ \__,_/____/_/ /_/
• Build initialized
┌ Checking project files
Unhandled exception:
HiveError: This should not happen. Please open an issue on GitHub.
#0 BinaryReaderImpl.readFrame (package:hive/src/binary/binary_reader_impl.dart:250)
#1 FrameHelper.framesFromBytes (package:hive/src/binary/frame_helper.dart:21)
#2 FrameIoHelper.framesFromFile (package:hive/src/io/frame_io_helper.dart:42)
<asynchronous suspension>
#3 StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:86)
<asynchronous suspension>
#4 HiveImpl._openBox (package:hive/src/hive_impl.dart:116)
<asynchronous suspension>
#5 HiveImpl.openBox (package:hive/src/hive_impl.dart:145)
<asynchronous suspension>
#6 BuildCommand.run (package:rush_cli/commands/build_command/build_command.dart:118)
<asynchronous suspension>
#7 CommandRunner.runCommand (package:args/command_runner.dart:196)
<asynchronous suspension>
C:\Users\user\Desktop\Rush codes\tasks>rush build -r
__
_______ _______/ /_
/ ___/ / / / ___/ __ \
/ / / /_/ (__ / / / /
/_/ \__,_/____/_/ /_/
• Build initialized
┌ Checking project files
Unhandled exception:
HiveError: This should not happen. Please open an issue on GitHub.
#0 BinaryReaderImpl.readFrame (package:hive/src/binary/binary_reader_impl.dart:250)
#1 FrameHelper.framesFromBytes (package:hive/src/binary/frame_helper.dart:21)
#2 FrameIoHelper.framesFromFile (package:hive/src/io/frame_io_helper.dart:42)
<asynchronous suspension>
#3 StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:86)
<asynchronous suspension>
#4 HiveImpl._openBox (package:hive/src/hive_impl.dart:116)
<asynchronous suspension>
#5 HiveImpl.openBox (package:hive/src/hive_impl.dart:145)
<asynchronous suspension>
#6 BuildCommand.run (package:rush_cli/commands/build_command/build_command.dart:118)
<asynchronous suspension>
#7 CommandRunner.runCommand (package:args/command_runner.dart:196)
<asynchronous suspension>
C:\Users\user\Desktop\Rush codes\tasks>clear
C:\Users\user\Desktop\Rush codes\tasks>rush build
__
_______ _______/ /_
/ ___/ / / / ___/ __ \
/ / / /_/ (__ / / / /
/_/ \__,_/____/_/ /_/
• Build initialized
┌ Checking project files
Unhandled exception:
HiveError: This should not happen. Please open an issue on GitHub.
#0 BinaryReaderImpl.readFrame (package:hive/src/binary/binary_reader_impl.dart:250)
#1 FrameHelper.framesFromBytes (package:hive/src/binary/frame_helper.dart:21)
#2 FrameIoHelper.framesFromFile (package:hive/src/io/frame_io_helper.dart:42)
<asynchronous suspension>
#3 StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:86)
<asynchronous suspension>
#4 HiveImpl._openBox (package:hive/src/hive_impl.dart:116)
<asynchronous suspension>
#5 HiveImpl.openBox (package:hive/src/hive_impl.dart:145)
<asynchronous suspension>
#6 BuildCommand.run (package:rush_cli/commands/build_command/build_command.dart:118)
<asynchronous suspension>
#7 CommandRunner.runCommand (package:args/command_runner.dart:196)
<asynchronous suspension>
C:\Users\user\Desktop\Rush codes\tasks>clear
C:\Users\user\Desktop\Rush codes\tasks>rush build -r
__
_______ _______/ /_
/ ___/ / / / ___/ __ \
/ / / /_/ (__ / / / /
/_/ \__,_/____/_/ /_/
• Build initialized
┌ Checking project files
Unhandled exception:
HiveError: This should not happen. Please open an issue on GitHub.
#0 BinaryReaderImpl.readFrame (package:hive/src/binary/binary_reader_impl.dart:250)
#1 FrameHelper.framesFromBytes (package:hive/src/binary/frame_helper.dart:21)
#2 FrameIoHelper.framesFromFile (package:hive/src/io/frame_io_helper.dart:42)
<asynchronous suspension>
#3 StorageBackendVm.initialize (package:hive/src/backend/vm/storage_backend_vm.dart:86)
<asynchronous suspension>
#4 HiveImpl._openBox (package:hive/src/hive_impl.dart:116)
<asynchronous suspension>
#5 HiveImpl.openBox (package:hive/src/hive_impl.dart:145)
<asynchronous suspension>
#6 BuildCommand.run (package:rush_cli/commands/build_command/build_command.dart:118)
<asynchronous suspension>
#7 CommandRunner.runCommand (package:args/command_runner.dart:196)
<asynchronous suspension>
How do I fix this? I’m using the latest version.
Hmm… Just deleted the data.hive
as Shreyash had told me earlier to do so, found only this file contained data…so deleted and it was fine.
I saw a bug in rush, even If I didn’t mentioned deps in rush.yml, my aix compiled successfully with all classes
@Shreyash Correct me If I am wrong
No, how can they be compiled?
Even if its compiled, it maybe missing the library.
No, that is not a bug. It’s one of the few design decisions Rush has taken from the extension-template.
Rush, by default, assumes every JAR library in the deps
directory as the project’s compile-only dependency. And only the libraries that are defined in the metadata file (rush.yml
) are packed with the AIX and made available during the extension’s runtime (in the companion or the exported APK).
So, even if your extension did compile without defining the runtime libraries in the metadata file, it won’t work when you use it in an actual app or the companion.
I could have made it mandatory to define the compile-time dependencies in the metadata file, but that would have only made things more verbose than they should be. For example, if one of your extension’s dependencies have 10 compile-time dependencies, you would have to list out each of it in the metadata file, making it unnecessarily big.
Helllo @Shreyash ,
I’ve used some of the classes written in Kotlin and my main extension class is written in Java . I got this error. Should i have to write main extension class in Kotlin too if i was using Kotlin classes ?? or How can I enable kotlin in rush.yml ??
Kotlin files detected. Please enable Kotlin in rush.yml
How can I enable kotlin in rush.yml ??
You can enable it by writing a small code in metadata file.
Like this
build:
desugar:
enable: true
desugar_deps: false
kotlin:
enable: true
And see the here wiki for more info
Thankyou Sumit. Extension is successfully built.
Building the extension with -r
flag or -o
flag probably splits the Service file changing its package with the one mentioned in the XML and causes the above error. Any way to prevent it? Or keep the service file as it is?
This is probably because of ProGuard… try removing everything from the proguard-rules.pro
and test it then. You can also try including the following snippet in the proguard-rules.pro
.
-keep public class packageName.classNameOfServicesFile {
public *;
}
Yeah. I enabled the optimization because it’s 3 times big (compared to 25 KB compared to 145 KB).
You can also try including the following snippet in the
proguard-rules.pro
.
Okay I will try it.
Yeah! Rush is super fast!