I have a project that uses Dart and the web_ui package. I just upgraded Dart to libv2, specifically:
Dart Editor version 0.3.1_r17594
Dart SDK version 0.3.1.3_r17594
I just updated web_ui to 0.3.0+2.
Now, I'm getting these errors:
Cannot find referenced source: package:web_ui/web_ui.dart
no such type "WebComponent"
"ChatWindowComponent" has no method named "dispatch"
When I run my build.dart, it completes successfully, but it doesn't create an out directory. Nor does it give any error messages.
What's going on? Why can't it find package:web_ui/web_ui.dart? I can clearly see that pub has set stuff up correctly.
It's a known issue. See http://code.google.com/p/dart/issues/detail?id=7822. The issue was closed today. I tried out a continuous build of Dart Editor, but that lead to different errors--I'll save that for another question.
When I run my build.dart, it completes successfully, but it doesn't create an out directory. Nor does it give any error messages.
I run the editor with 'automatically run pub' disabled. Creating a new web ui projects yields a few errors, after installing pub the errors are gone, but the timestamps of the files are to old now.
I changed the file that was to build and the out directory appeared immediately.
Related
I'm trying to start a Grails 4 application in Intellij, the project is configured with Java 8 and Gradle seems to be loaded correctly, but it gives me the following error:
error: Could not find or load main class org.grails.cli.GrailsCli
Is there any know method in which I can get around this problem?
First, check if the language level and SDK are correct (File > Project Structure > (Project/Modules) > Language Level)
From 360learntocode' blog post:
This might be due to the removal of some dependencies or libraries
from the application. Sometimes, while loading multiple applications
from IDE while downloading the library for a particular project other
libraries for another project might remove so this kind of error might
occurs for that project.
Let's first delete the build folder under the application.
Now, let's refresh the Gradle project. Here we are using IntelliJ
Idea, we can refresh the project as below
Image description:
Click Gradle on the right tab;
Select the project;
Click refresh.
After refreshing the project it will download the missing
dependencies. Then run the application which will resolve the problem.
We can also try cleaning the application.
If we are using the command line then type the following command to
clean the application.
grails clean
If we are using the IntelliJ idea then Ctr+Alt+G opens the command
window and use the following command.
clean
Now, re-run the app.
Both new flutter and new react-native projects fail to build because the xcodebuild tool fails. They, however, succeed when I build the projects manually inside Xcode.
Apparently, the reason is because xcodebuild adds additional flag during the build, that, is:
export OTHER_CPLUSPLUSFLAGS=" -fmodule-map-file="/Users/aa/code/WW2/ios/Pods/Headers/Public/SSZipArchive/SSZipArchive.modulemap""
The result is that the build is failing because it cannot find the said module map, with the following error:
<unknown>:0: error: module map file '/Users/aa/code/WW2/ios/Pods/Headers/Public/SSZipArchive/SSZipArchive.modulemap' not found
The said module map is from a previous project (called WW2) which I moved. But the problem is that even newly-created projects are affected.
I wasted two days to solve this, even reading through the documentation about xcode build settings, but to no avail. What I'm trying to do is to find the source of this additional flag or configuration. I even used grep to find a file containing the particular flag, but it's not yet finished scanning my system.
So the problem is somehow the $PODS_ROOT variable is set to /Users/aa/code/WW2/ios/Pods, probably due to a canceled npm build. I only needed to restart the terminal and the problem is solved.
As a side note, I should have used the search function in the finder as it's much faster because it uses an index unlike grep.
I am trying to compile kotlin multiplatform, which contains iOS target.
I tried different examples over github, but most of them are outdated and don't work, probably because of incompatibility with current tools. Thing, that seems most reasonable is creating Mobile Android/iOS | Gradle or Mobile Shared Library | Gradle project using IntelliJ Idea.
When I create brand new project, I am still getting same error:
> Task :app:compileKotlinIos FAILED
e: Could not find "stdlib" in [~/git/iosandroidtest, ~/.konan/klib, ~/.konan/kotlin-native-macos-1.3.61/klib/common, ~/.konan/kotlin-native-macos-1.3.61/klib/platform/ios_x64].
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileKotlinIos'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
I am using kotlin 1.3.61, xcode 11.3. Any ideas?
Edit:
I pushed empty project (without any changes from me) to github:
https://github.com/hovi/iostest
I think you just ran into a bug with partial archive download.
Per the author there, "I got a snapshot of the .konan directory. It's interesting as it looks like part of the runtime download is there, but some parts are missing. Specifically in this case the common folder in klib, but also the licenses folder.
I was able to repro this locally by killing the build process while the archive is being extracted. For reference, see NativeCompilerDownloader. It looks to see if the folder is there. If not, it'll download and extract. If yes, the build process assumes everything is OK. ... Their local build will certainly be broken from then on until they clean and rebuild ~.konan." I suggest you report your issue there as well. (btw - tried your project in IJ and AS (as well as creating new lib project in IJ), didn't have any issues. Somehow your bad luck with an interrupted download (:))
Link to GitHub issue
I am very new to Dart so bear with me. I completed the sample pirate badge project and did Pub Build - Minified as instructed. The generated build folder does not contain the packages/browser/dart.js and priatebadge.dart files that are referenced by piratebadge.html.
When I view in the browser there are errors related to those missing files. If I change the html page to reference the generated piratebadge.dart.js file it works.
Is this manual change something that has to be done with dart projects? or am I missing something in the build process?
At first, ensure you build in release mode. (default if you run pub build from command line.
I haven't checked for a while but I assume there is still this Dart script tag which was introduced when it was still planned to integrate Dart into Chrome. This will hopefully fixed soon. In the meantime you can fix this manually or use https://pub.dartlang.org/packages/dart_to_js_script_rewriter to automate this step.
I have started getting this issue now after going through a lot of "chaos" with performing a system restore (I'm on Win8.1) while trying to get a certain game working again. Now that that mess is over and done with, I have been left with a few apps and such removed and needing to be reinstalled, including the JDK which I have already reinstalled. Since I have a project I need to work on I opened up DartEditor again and when I tried to do pub build I get this error:
Pub build failed, [255] Wrong script snapshot version, expected
'f6711525cff9f7d0d08595166664b767' found '836a274342f7f88d6b5a9bb59b2649a9'
Googling led me to this old issue but that's labelled as fixed...what could be going wrong here?
Ok, so deleting the dart directory (the one with the editor executable, relevant .jar files and all that other stuff) and downloading it anew did resolve my issue. I'm curious though as to whether anyone knows what might have caused the issue, and/or what other things I might have been able to do to resolve it.