I am trying to import a cordova project in Android Studio. I have seen this answer but still have some issues which need clarification or a solution if exists.
The cordova project is now imported in Android Studio and got an Gradle sync error. It suggests me to "install build tools 19.0.0 and sync project". I suppose that by doing this the cordova won't support Android 5. Am I right? Moreover, is there any workaround for that?
Related
When create a Cordova Android project by running Cordova prepare everything seems to be created correctly.
It creates a file called cdv-gradle-config.json with all versions that I want to use (the versions that are verfied from Cordova)
See picture
When I then open the project in Android Studio the build script and gradle seems to run fine. But Android Studio downloads Gradle wrapper 6.8 every time! Regardless of the version in the above file.
And when verifying all other versions for modules and dependencies in Android Studio they all seems to be unresolved:
Modules versions
more issues
And when looking into Gradle, it actually seems to be 6.8, but why is the version not fetched from the gradle config file created by Cordova?
Gradle versions
So my question is, why does it look like this? I have installed nodejs, Gradle and Cordova and they all work fine, except this behaviour.
I know I can just set the versions manually in Android Studio, but that's not the question, the question is why those dynamically versions from the config file doesn't work, and why Android Studio then "defaults" to 6.8 gradle. (I have 7.1.1 installed on my computer, which is verfied by gradle --version
Software used:
Windows 10
Cordova CLI 11
Android Studio 2020.3.1
Gradle 7.1.1 (installed on my machine.)
Gradle wrapper 6.8 (used by Android Studio, why is this??)
I have updated Android Studio to 1.5.1 , i am trying to checkout project from SVN, but there is no option. I have looked into plugin to install SVN but didn't find anything as well.
Is there something i am missing?
I reckon earlier android studio versions has SVN checkout option.
Also in the Android Studio preferences i don't see Sub-version option.
You should use git-svn if you still have to use svn
With the release of Android Studio 1.0 (AS) i want to migrate from Eclipse. Generally I need no other library then libpd (PureData) for Audio synthesis. The Problem is, that libpd for android is geared to the needs of Eclipse. So in Eclipse everything is working as expected.
The only information I could found was that: Using libpd in Android Studio So I know libpd and Android Studio could work together but here are maybe some other problems.
I started to generate a new simple project (MinSDK 10 - CompileSDK 21 - BuildTools 21.1.2) just with a blank activity. I can deploy this simple app to my Nexus and everything is fine.
Then I import :PDCore and :AndroidMidi as Module into my AS project and I get the Gradle build-error: Error:The SDK Build Tools revision (17.0.0) is too low for project ':PdCore'. Minimum required is 19.1.0
I installed API 19 and Build Tools version 19.1 via the SDK Manager but that's not solving my problem.
I changed the buildToolsVersion of the apps build.gradle file to "19.1.0" but that's not solving my problem.
Any advices to get Gradle working probably?
Maybe anyone got a sample Android Studio project with libpd to share?
Thanks in advance!
FYI: I wrote some posts regarding migrating to Android Studio using libpd. Take a look here:
http://www.journal.deviantdev.com/using-libpd-with-android-studio/
http://www.journal.deviantdev.com/update-using-libpd-with-android-studio/
http://www.journal.deviantdev.com/sample-libpd-android-studio/
You have to change the build.gradle of the :PDCore and :AndroidMidi modules. At the moment they are using 17, update the BuildTools to the newest version (21.1.2). This should solve your problem.
I created a fork of the libpd-for-android and migrated it to Android Studio. You can clone it and open it in Android Studio as a 'Non Android Studio Project'. This worked very nicely for me and you can also now created an .aar file and use it in your Android App ( instead of copying the whole code or using git submodules):
https://github.com/tkirshboim/pd-for-android
I am having issue similar to here.
I upgraded from cordova 3.1 to 3.3 because I wanted to use the remote debugging offered in 3.3 and androind 4.4 but now all the JAVA packages are broken for an unknown reason.
having just very basic skill in java I have no idea what is going on.
In cordova 3.3 the cordova api is no more in a jar but in a separate project.
If not already done, do cordova platform android
Then in eclipse re-do "import existing android project into workspace" and you should a second project named CordovaLib.
If cordova-3.1.jar is still in the libs folder, remove it.
I know that this has been asked for 10 times but I have tried all solutions have been proposed on stackoverflow but none of them worked for me.
I have tried these but no result:
Android Studio Stuck at Gradle Download on create new project
Android Studio error installing Gradle
Build issues with Gradle Android studio 0.2.1
This problem happens when we work with android sdk studio different from what you should do is install Android Support Repository
https://sites.google.com/a/android.com/tools/knownissues