Crystax usage with IntelliJ IDEA - android

I have tried the Crystax sample on IDEA, and I have compiled it successfully, got it to run on my phone.
However, when I try to modify the project, IDEA throws an error about Gradle version:
Error:The project is using an incompatible version of the Android Gradle "experimental" plugin.
Please update your project to use version 0.9.0.
Then I updated it and met new problems:
Gradle version 3.3 is required. Current version is 4.1.
Please fix the project's Gradle settings.
I choose to Fix Gradle wrapper and re-import project
Then the next error appears:
Cannot set readonly property: proguardFiles for class: com.android.build.gradle.managed.BuildType
Please, is there anyone who knows how to use Crystax on IDEA IDE?

I found an alternative way, which does not relies on AS to build.
Just set your system PATH to Crystax-ndk folder, set up your Application.mk and Android.mk, and run command:
ndk-build
then you will get the result lib or executable file, then, link it to your Android project.

Related

Could not create an instance of Tooling API implementation using the specified Gradle installation

I just downloaded and installed the latest version of android studio (v 1.4). After creating a new project, I see this error about the gradle refresh failure:
Error: Could not create an instance of Tooling API implementation using the specified Gradle installation '/Applications/Android Studio.app/Contents/gradle/gradle-2.4'.
I've tried so many different things that I have found online and no fix. When I open the layout window of the project it says "Gradle project sync failed..."
I am not sure what the error means at all and also do not know how to use any other different version of it.
I had this problem, fix is don't use gradle 2.4 I deleted gradle/gradle 2.4 folder and in gradle/wrapper/ gradle-wrapper-properties in build directory change 'distributionUrl' to another gradle distribution.
Deleting everything in /Library/Java/Extensions/ fixed this for me.
Issue with more info: https://issues.gradle.org/browse/GRADLE-1451
Add lines at the end of eclipse.ini
--illegal-access=warn
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
source

Import a project to Android studio faced problems

I want reading an open source project so I select k9mail for start. The recommendation was run and reading this code in Android Studio. I import k9mail project to AS 1.2.1.1 version. I download gradle 2.4 version and added this in environment variable. When I want to run this application, but I receive some errors that I describe below:
1) When I click Run (Alt+Shift+F10), select Android Application, select my module (there is k9mail) and select USB Device, then I see a warning:
No JDK specified for module 'k-9-master'.
2) When I click on Run (Shift+F10), I faced this error in messages tab:
Gradle DSL method not found: 'android()'
Possible causes:
A)The project 'k-9-master' may be using a version of Gradle that does not contain the method.Open Gradle wrapper file
B)The build file may be missing a Gradle plugin. Apply Gradle plugin
When I updated gradle to 2.4, I changed classpath 'com.android.tools.build:gradle:1.2.3' to 'classpath 'com.android.tools.build:gradle:2.4'' from build.gradle of k9mail, but my problems were not solved.
I googled but I can't find solutions for my problems.
No jdk specified for the module.
For that you have to specify the jdk path through Project Structure.
You may also verify by looking at local.properties
For gradle related issues you just kindly update your gradle build and SDKs to latest versions.
This will minimize your gradle issues.

IDEA reports Error with Android Gradle Build Target

I cannot build the project using Idea, I get following message right after launch:-
Error:Android Gradle Build Target: org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle installation 'C:\Users\username\.gradle\wrapper\dists\gradle-1.11-bin\4h5v8877arc3jhuqbm3osbr7o7\gradle-1.11'.
content of following directory:
c:\Users\malousek\.gradle\wrapper\dists\gradle-1.11-bin\4h5v8877arc3jhuqbm3osbr7o7\gradle-1.11\
is following:
bin
init.d
lib
media
changelog, license, notice,
IDEA Settings for Gradle:
Use Default Gradle Wrapper (recommended)
Last time I tried Intellij 13 It had many problems with Gradle (1.11+), use Intellij EAP 14 or switch to Android Studio.
You can try removing "C:\Users\username.gradle\wrapper\dists\" directory and resync your gradle project.

Error when importing a Gradle project into Android Studio

I am trying to import a Gradle project into Android Studio and get the following error:
This project does indeed compile when I run Gradle from the command line. I can also Open the project in Android Studio (vs Import) but then it tries to build using the Eclipse build script.
The gradle build was created by hand and not via the Eclipse export function.
My problem can be resolved in one of two ways:
1) Tell me how to force Android Studio to use Gradle instead of using the Eclipse build.
2) Help me find the reason for the Gradle import error.
I am using
Android Studio 0.2.2
Gradle 1.6 via gradlew
I finally found out why this didn't work.
There are two ways to include a project from within the settings.gradle file:
include ':..:source:compA-api'
and
include "source:compA-api"
project(':source:compA-api').projectDir = new File(settingsDir, 'source/compA/api')
I had used the second form and apparently Android Studio didn't like that :)

Android Lombok IntelliJ integration

I'm trying to include lombok in my android project, I'm using IntelliJ IDEA as my IDE.
The project is built with maven. I've added the lombok dependency and compiling the project with maven succeeds.
In IntelliJ I've installed the lombok plugin which also works - I see the generated getters/setters.
Hovewer, when I try to make the project in IntelliJ, the build fails:
error: cannot find symbol method setName(String)
In a standard Java environment, adding lombok to the classpath would be sufficient for the project to compile. What in the android environment is causing the compilation to fail?
EDIT: I've created an issue on the IntelliJ Bugtracker: http://youtrack.jetbrains.com/issue/IDEA-94749
I've filed a bug and they fixed it in IntelliJ IDEA 12.1:
http://youtrack.jetbrains.com/issue/IDEA-94749
have your tried to Enable annotation processing ?
go under Settings->Compiler->Annotation Processors. and make sure 'Enable annotation processing' is enabled.

Categories

Resources