I am trying out android crosswalk project. I am having problems adding crosswalk webview to andriod studio though. I am not sure where I am going wrong nor do I understand most terminology yet.
I read https://crosswalk-project.org/documentation/embedding_crosswalk.html but I refers to https://developer.android.com/tools/sdk/eclipse-adt.html which is no longer supported. This seems to be outdated but I tried anyway with Android Studio 1.2.2.
I tried making a project with https://crosswalk-project.org/documentation/downloads.html Android webview (ARM) 13.42.319.11 as told in the documention. I am not sure what is meant with 'open ADT' but I assumed Android Studio instead of the plugin of eclipse. I opened from an 'existing android studio project' (the download unzipped). But didn't come across the option 'set root directory'.
I then tried to create a new android studio project and ran it. It showed the basic hello wold example on my phone. Then I followed the remaining steps by pasting in the code they provided. I ran it again and got 3 errors:
Error:(3, 22) error: package org.xwalk.core does not exist
Error:(9, 13) error: cannot find symbol class XWalkView
Error:(15, 23) error: cannot find symbol class XWalkView
I am not sure what to do from here as this is all very new to me.
Basically I am trying to run there example but can't figure out why the import isn't working.
I am having the same problem but I finally fixed it by placing the xwalk_core_library.jar in the libs folder, together with arm64-v8a and x86_64 subfolders and I have removed compile 'org.xwalk:xwalk_core_library:x.x.x.x' from dependecies.
Updated Links 19-07-2016
maven {
url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
}
And In dependencies add this
compile 'org.xwalk:xwalk_core_library_beta:9.38.208.8'
Related
Please forgive the vague sounding title
I am trying to get this project to compile in android studio:
https://proandroiddev.com/how-to-create-a-bubble-selection-animation-on-android-627044da4854
https://github.com/igalata/Bubble-Picker
Downloading the github project and compiling it as it is did not work, I am getting this error, and redownloading dependencies and syncing as suggested in the error message did not work
UPDATE: I have upgraded android studio, gradle and kotlin plugin to latest version and it's still the same problem.
I can use the library version of this project just fine, using the steps described in the github page. I want to compile the source code of this component together with my project so that I can tweak the bubble animation itself. Since the github project itself does not compile, I created a Hello World project first, then manually copied in the bubblepicker folder in the Hello World project. Inside the bubblepicker folder, I changed the name of the folder tree java/com/iglata/bubblepicker to java/com/test/app/bubblepicker, and changed the package name of the files inside this folder to reflect this. I then copied the code in DemoActivity.kt to my MainActivity.kt and changed the package names and made few minor adjustments to make the compiler errors go away.
I have made some modifications in the gradle files as well so that gradle syncing does not give any errors. However, anything inside bubblepicker does not seem to be detected in the MainActivity.kt, or it's activity layout xml file. For example,
import com.test.app.bubblepicker.BubblePickerListener
is marked with red colour in android studio and the error is unresolved reference. If I remove all references to bubblepicker and replace the code in MainActivity.kt with the Hello World code, then it compiles and runs fine, so it's as if bubblepicker is not getting picked up by the compiler at all.
What could be the problem here?
Or at the very least, how can I compile the bubblepicker github project? Simply loading the whole project in Android Studio is giving me compiler errors. I am doing this on Android Studio 3.5 on macOS with Kotlin version latest as of September 4.
I didn't get any error while import Github project.
Kindly update your android studio and kotlin Gradle version and check same.
I created a Xamarin.Android project and after I set the configuration:
- Dex compiler: D8
- Code Shrinker: R8
- Linking: Sdk Assembleies Only
I am presented with this error:
Program type already present: android.support.annotation.PluralsRes
I also have the LinkerPleaseInclude file.
I have to say that I am in Debug configuration.
I solved this issue by clearing cache for Nuget Packages.
I know I'm a bit late but since the answer for this matter did not work for me, here is how I solved it:
First of all, it's obviously a NuGet packages problem, so I searched in my .nuget folder at C:\Users{yourUser}.nuget\packages and looked inside some of the folders, in my case the Android support libraries folders, and saw that there were folders for many versions of that library excetp for the one I was referencing in my project wich was 28.0.0.3, the last version at this moment, the newest I had in the folder was for 28.0.0.1 so instead un uninstalling and installing everything again I just modified the android.csproj, changed the referenced versions for the support libraries for 28.0.0.1 and then it gave another error, I just literally downgraded some other libraries to 28.0.0.1 from Visual Studio NuGet package manager and then everything worked fine.
Have a nice one. It took weeks for me of trying to find out.
Neither of the above solutions worked for me. I encountered the error opening an Xamarin project that was created in VS 2015 on VS 2019. I changed the "Compile using android version" in the manifest to Android 9.0, updated the NuGet packages, but this error remained. I also attempted the tried-and-true deleting ".vs", "bin" and "obj" folders.
What finally got rid of the "Program type already present: android.support.annotation.PluralsRes" error was deleting everything in the "Packages" folder for the project. My understanding is that directory was eliminated in VS 2017, but suppose because the original project was VS 2015 it was still being utilized and causing the conflict.
I was getting
Program type already present: androidx.appcompat.content.res.AppCompatResources$ColorStateListCacheEntry error.
I had 2 references
a)Xamarin.AndroidX.Appcompat and
b)Xmarin.Androidx.appcompat.content.res.AppCompatResources
I removed the reference Xmarin.Androidx.appcompat.content.res.AppCompatResources
And now the project builds without errors
I just went through the GearVRf setup instructions (here), and trying to get the demo/sample applications to compile. The framework compiles fine, but when I open a project and build it, I get:
Unresolved dependencies
Error:Failed to resolve: :backend-debug:
This happens for any demo I choose,and is all the information I am given.
Also, the 'Android Support Repository' is installed, if that is your first guess.
Any suggestions on either getting more information about the problem, or how to fix it?
Thanks
Turns out the necessary dependency (backend-debug.arr) is in the GearVRf-Demos directory.
If you move the GearVRf-Demos directory INSIDE the "GearVRf" directory, everything magically works.
Giving you: "..\GearVRf\GearVRf-Demos\gearvrf-libs"
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)