I can't get the following extension to work on vs code android-support
I specify that Java is correctly installed on my computer as well as gradle and android studio
When I run the extension I type in my application name as well as the name for the package except at the end when I press enter I have the following error appearing.
Cannot read properties of undefined (reading '0')
Related
Please don't mark as a duplicate. I have tried to read this Flutter : Target file "lib/main.dart" not found but I have found no answer, because what I ask will be little different
so I have this error when I run my Flutter App through the Android project (from Android Studio), I mean for some reason I did not run the project through the Flutter project (not from VS Code). I have no issue If run my Flutter app through VS Code
this is the error
Error: Error when reading 'lib/main.dart': No such file or directory
import 'package:mobile/main.dart' as entrypoint
so basically the Android Studio can't find the main.dart.
I implement Flavor on my Flutter, so I have several main functions such as main_production.dart, main_staging.dart and main_development.dart instead of normal main.dart . thats why the system can't find the entry point.
In iOS Xcode, I can set the main entry point through Flutter Target like this
but now I am confused, how to connect my Android project to the several main function (my dart files)
In android studio, open action menu with (cmd+shift+a on mac and ctrl+shift+a on windows/linux) and select Edit configurations
Then, using a plus sign at the top, add a new flutter run config
And specify an appropriate entrypoint and flavor:
All that's left is to run the new config using either of the green buttons at the top (run or debug)
I tried to send my CodenameOne application to the build server, but I keep getting this build server error: http://pastebin.com/Rr2GLQWR
(It contains too many characters for Stackoverflow..)
It is running in the simulator and the last line of the error says
(build should be done)
I found a possible solution giving it the android.gradle = false build hint, but that didn't matter though.
I have no clue what is wrong.
Do you have a file named .class within your distribution?
Did you change the java language level to Java 8 or something like that in the project after it was created?
You can't do that if you originally created a Java 5 project see http://www.codenameone.com/blog/java-8-support.html
I'd like to do Android development in Clojure, using the Cursive plugin in Android Studio. I've seen several posts where people have stated that it is possible, but I haven't been able to get it working.
When I try to build, I get errors reported where I'm trying to call Clojure from Java:
Error:(6, 18) error: package com.domain does not exist
Error:(15, 49) error: cannot find symbol variable tiny
Here's what I tried:
I already have Cursive running in IntelliJ with leiningen, building and running standalone Clojure apps
Start Android Studio, version 1.5.1
Create a new Android project. Selected API level 15, Empty Activity
Install Cursive plugin, as per this post:
Is it possible to get the Cursive Plugin installed with Android Studio?
Add clojure jar to classpath: Open module settings, dependencies, +Library Dependency, search for and select org.clojure:clojure:1.8.0-RC5
Switch from Android view to Project view, to create Clojure src directory: select app/src/main and create new directory clojure
The next step is to create a Clojure source file, which can be called from Java, using the example in this post: Calling clojure from java
Select src directory clojure, right-click New Clojure Namespace and enter: com.domain.tiny (to match the ns used in the example)
Paste the code from the example above into the new file (note that the ns in the new file was tiny and should have been com.domain.tiny)
It will say File tiny.clj is not under a source root so click on Add source root. Now we have both src/java and src/clojure set as src roots
Build the project. At this point it looks like everything is happy, no syntax errors in either the Java or Clojure code. We can deploy and run the (almost) empty Android project, and run a local REPL to load and test our Clojure code.
We want to call some Clojure code from Java, so add the following code to MainActivity (again, from the example above):
System.out.println("(binomial 5 3): " + tiny.binomial(5, 3));
System.out.println("(binomial 10042, 111): " + tiny.binomial(10042, 111));
Android Studio can find the package com.domain.tiny and the tiny class, no syntax errors, so looks good
Now try and build the project - at this point I get an error:
Error:(6, 18) error: package com.domain does not exist
Error:(15, 49) error: cannot find symbol variable tiny
At this point, I'm stuck. I'm guessing that even though the compiler is seeing the Clojure code ok, there's still something missing in the build process. Does leiningen need to be involved? If so, I don't know how, or what I might have to put in the project.clj configuration file.
Anyone have any ideas? Thanks!
Edit:
This appears to not be possible right now. This is because Android Studio requires projects to use Gradle, and the Clojure Gradle plugin is incompatible with the Android one. This may work in the future, but we couldn't make it work right now.
Original answer:
Thanks for the detailed issue. I guess that your Clojure code has to be AOT compiled for this to work. To enable this, check the settings under Settings->Build, Execution, Deployment->Compiler->Clojure Compiler. If you enable compilation for your Clojure namespaces, does that help?
I'm trying to make use of SignalR in Android Studio and while it apparently has added the projects and dependencies to my application project I'm getting constant
Error:(11, 39) error: package microsoft.aspnet.signalr.client does not exist
The import for these packages was dynamically added by Android studio as I started typing code to make use of it
Platform.loadPlatformComponent(new AndroidPlatformComponent());
So there is something there.
However when I try and actually build my main project I keep getting the package error.
I've run out of ideas now as to why it can know enough about the project to build it and reference the packages but then not actually find those packages for the main project to use.
Any ideas?
I never did find out how to do it via Android Studio. In the end I had to use Eclipse (and don't forget to change your workspace to use Java 1.6 or greater)
On Windows 7 (64 bit) with the Android SDK working perfectly with Eclipse - my first android application, using the first "Hello World" sample (found here - http://docs.xamarin.com/android/getting_started/hello_world - from Xamarin)
fails with the error "the OutputPath property who is not set for project NameProject.csproj".
I have tried re-runing the installation program from Xamarin and this error still occurs.
Could someone please suggest what may be causing this problem?
Thanks a lot.
the exact error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(9,9):
Error: The OutputPath property is not set for project 'helloWorld3.csproj'.
Please check to make sure that you have specified a valid combination of
Configuration and Platform for this project.
Configuration='Debug'
Platform='BPC'.
This error may also appear if some other project is trying to follow a
project-to-project reference to this project, this project has been
unloaded or is not included in the solution, and the referencing project
does not build using the same or an equivalent Configuration or Platform.
(helloWorld3)
I think we've seen this before. Your system manufacturer installed an environment variable called Platform onto your system. This breaks all msbuild based stuff, since msbuild automatically imports that as $(Platform), conflicting with the real $(Platform) that msbuild uses to compile.
Try removing the environment variable and try again.