[Solved]AndroidStudio Errors when used as Export Target


#1

I am doing Tutorial 3
I downloaded the latest Android Studio v2.1.2
When I export a simple GUI App with the modifications as explained in the tutorial I am getting the following errors:
Resolve Error
Unable to find method
‘org.gradle.api.Project.getPluginManager()Lorg/gradle/api/plugins/PluginManager;’.

AND

Cannot open project
‘/Users/anthonybonello/Documents/Programming/JUCE_coding/GuiApp4Android/Builds/AndroidStudio’

I tried to change the Minimum SDK (I downloaded all back to 14)
Had to reduce the Gradle Version currently set at 1.8 . Android Studio is saying that it works with anything between 1.8 and 1.11 (Not as the default of Producer - if I remember well it was 2.x)
It is also having issues with the grade-experimental wrapper version 0.7.0-rc1

I also tried to download more Gradle-related plugins (in particular gradle-intellij-plugin wizard refuses to work as it requires DevKit - Have not located the following yet)

A related issue - Android Studio says:
Consult IDE log for more details (Help|Show Log) for errors above
and the link to Show the log does not work. Anyone knows where they are stored on a MacOSX?

Sorry guys for the long message.
Cheers.


#2

Can you build it with gradle directly? To try this you need to copy the gradle wrapper script into your JUCE’s Build/AndroidStudio folder. To do this execute the following commands (assuming Android Studio is located in the Applications folder):

cp /Applications/Android\ Studio.app/Contents/plugins/android/lib/templates/gradle/wrapper/gradlew .
chmod +x gradlew
cp /Applications/Android\ Studio.app/Contents/plugins/android/lib/templates/gradle/wrapper/gradle/wrapper/gradle-wrapper.jar gradle/wrapper/

And then:

./gradlew assemble

What error messages are you getting?


#3

Thanks for replying @Fabian.

I had to manually create gradel/wrapper in my home folder as the third command line was complaining of not finding the folder. [I also notice that there is a gradlew file in my home directory.]

After this, the code worked and the following is the error produced:

Exception in thread “main” java.lang.RuntimeException: Wrapper properties file ‘/Users/anthonybonello/gradle/wrapper/gradle-wrapper.properties’ does not exist.

at org.gradle.wrapper.WrapperExecutor.forWrapperPropertiesFile(WrapperExecutor.java:45)

at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:60)


#4

I think you’ve set this up wrongly. Open your jucer file in the Projucer - make sure to delete the Builds and JuceLibraryCode folders first. Then do File -> Save Project. Let’s say your jucer file is at /Users/juce/Development/AndroidApp/AndroidApp.jucer Then open a terminal and do the following:

cd /Users/juce/Development/AndroidApp/Builds/AndroidStudio

The Projucer will have already created a gradle folder for you. Type-in

ls gradle/wrapper/*

You should see

gradle/wrapper/gradle-wrapper.properties

Note that it is gradle and not gradel (you typed gradel above). Now execute the commands I listed above:

cp /Applications/Android\ Studio.app/Contents/plugins/android/lib/templates/gradle/wrapper/gradlew .
chmod +x gradlew
cp /Applications/Android\ Studio.app/Contents/plugins/android/lib/templates/gradle/wrapper/gradle/wrapper/gradle-wrapper.jar gradle/wrapper/

And then:

./gradlew assemble

#5

It seems to be working: It is currently resolving dependencies and downloading jar files.
I will update when it finishes.

Build Failed - see below

Anthonys-MacBook-Pro:AndroidStudio anthonybonello$ ./gradlew assemble
Download http://jcenter.bintray.com/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.pom
Download http://jcenter.bintray.com/org/ow2/asm/asm/5.0.3/asm-5.0.3.pom
Download http://jcenter.bintray.com/org/ow2/asm/asm-parent/5.0.3/asm-parent-5.0.3.pom
Download http://jcenter.bintray.com/org/ow2/ow2/1.3/ow2-1.3.pom
Download http://jcenter.bintray.com/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.pom
Download http://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.pom
Download http://jcenter.bintray.com/net/sf/proguard/proguard-parent/5.2.1/proguard-parent-5.2.1.pom
Download http://jcenter.bintray.com/org/jacoco/org.jacoco.core/0.7.4.201502262128/org.jacoco.core-0.7.4.201502262128.pom
Download http://jcenter.bintray.com/org/jacoco/org.jacoco.build/0.7.4.201502262128/org.jacoco.build-0.7.4.201502262128.pom
Download http://jcenter.bintray.com/org/antlr/antlr/3.5.2/antlr-3.5.2.pom
Download http://jcenter.bintray.com/org/antlr/antlr-master/3.5.2/antlr-master-3.5.2.pom
Download http://jcenter.bintray.com/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
Download http://jcenter.bintray.com/com/android/tools/jack/jack-api/0.10.0/jack-api-0.10.0.pom
Download http://jcenter.bintray.com/com/android/tools/jill/jill-api/0.10.0/jill-api-0.10.0.pom
Download http://jcenter.bintray.com/com/squareup/javawriter/2.5.0/javawriter-2.5.0.pom
Download http://jcenter.bintray.com/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
Download http://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.pom
Download http://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.pom
Download http://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.pom
Download http://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.pom
Download http://jcenter.bintray.com/com/google/guava/guava/17.0/guava-17.0.pom
Download http://jcenter.bintray.com/com/google/guava/guava-parent/17.0/guava-parent-17.0.pom
Download http://jcenter.bintray.com/com/tunnelvisionlabs/antlr4/4.5/antlr4-4.5.pom
Download http://jcenter.bintray.com/com/tunnelvisionlabs/antlr4-master/4.5/antlr4-master-4.5.pom
Download http://jcenter.bintray.com/commons-io/commons-io/2.4/commons-io-2.4.pom
Download http://jcenter.bintray.com/org/apache/commons/commons-parent/25/commons-parent-25.pom
Download http://jcenter.bintray.com/org/apache/apache/9/apache-9.pom
Download http://jcenter.bintray.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.pom
Download http://jcenter.bintray.com/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.pom
Download http://jcenter.bintray.com/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.pom
Download http://jcenter.bintray.com/org/ow2/asm/asm-parent/5.0.1/asm-parent-5.0.1.pom
Download http://jcenter.bintray.com/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.pom
Download http://jcenter.bintray.com/org/antlr/ST4/4.0.8/ST4-4.0.8.pom
Download http://jcenter.bintray.com/com/google/code/gson/gson/2.2.4/gson-2.2.4.pom
Download http://jcenter.bintray.com/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.pom
Download http://jcenter.bintray.com/org/apache/commons/commons-parent/33/commons-parent-33.pom
Download http://jcenter.bintray.com/org/apache/apache/13/apache-13.pom
Download http://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.pom
Download http://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-client/4.1.1/httpcomponents-client-4.1.1.pom
Download http://jcenter.bintray.com/org/apache/httpcomponents/project/4.1.1/project-4.1.1.pom
Download http://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.pom
Download http://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-client/4.1/httpcomponents-client-4.1.pom
Download http://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.pom
Download http://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.pom
Download http://jcenter.bintray.com/com/tunnelvisionlabs/antlr4-runtime/4.5/antlr4-runtime-4.5.pom
Download http://jcenter.bintray.com/com/tunnelvisionlabs/antlr4-annotations/4.5/antlr4-annotations-4.5.pom
Download http://jcenter.bintray.com/com/intellij/annotations/12.0/annotations-12.0.pom
Download http://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.pom
Download http://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-core/4.1/httpcomponents-core-4.1.pom
Download http://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
Download http://jcenter.bintray.com/org/apache/commons/commons-parent/5/commons-parent-5.pom
Download http://jcenter.bintray.com/org/apache/apache/4/apache-4.pom
Download http://jcenter.bintray.com/commons-codec/commons-codec/1.4/commons-codec-1.4.pom
Download http://jcenter.bintray.com/org/apache/commons/commons-parent/11/commons-parent-11.pom
Download http://jcenter.bintray.com/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.pom
Download http://jcenter.bintray.com/org/abego/treelayout/org.abego.treelayout.core/1.0.1/org.abego.treelayout.core-1.0.1.pom
Download http://jcenter.bintray.com/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
Download http://jcenter.bintray.com/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar
Download http://jcenter.bintray.com/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar
Download http://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.jar
Download http://jcenter.bintray.com/org/jacoco/org.jacoco.core/0.7.4.201502262128/org.jacoco.core-0.7.4.201502262128.jar
Download http://jcenter.bintray.com/org/antlr/antlr/3.5.2/antlr-3.5.2.jar
Download http://jcenter.bintray.com/com/android/tools/jack/jack-api/0.10.0/jack-api-0.10.0.jar
Download http://jcenter.bintray.com/com/android/tools/jill/jill-api/0.10.0/jill-api-0.10.0.jar
Download http://jcenter.bintray.com/com/squareup/javawriter/2.5.0/javawriter-2.5.0.jar
Download http://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar
Download http://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar
Download http://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar
Download http://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.jar
Download http://jcenter.bintray.com/com/google/guava/guava/17.0/guava-17.0.jar
Download http://jcenter.bintray.com/com/tunnelvisionlabs/antlr4/4.5/antlr4-4.5.jar
Download http://jcenter.bintray.com/commons-io/commons-io/2.4/commons-io-2.4.jar
Download http://jcenter.bintray.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar
Download http://jcenter.bintray.com/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.jar
Download http://jcenter.bintray.com/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.jar
Download http://jcenter.bintray.com/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.jar
Download http://jcenter.bintray.com/org/antlr/ST4/4.0.8/ST4-4.0.8.jar
Download http://jcenter.bintray.com/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar
Download http://jcenter.bintray.com/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar
Download http://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar
Download http://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar
Download http://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar
Download http://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar
Download http://jcenter.bintray.com/com/tunnelvisionlabs/antlr4-runtime/4.5/antlr4-runtime-4.5.jar
Download http://jcenter.bintray.com/com/tunnelvisionlabs/antlr4-annotations/4.5/antlr4-annotations-4.5.jar
Download http://jcenter.bintray.com/com/intellij/annotations/12.0/annotations-12.0.jar
Download http://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.jar
Download http://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
Download http://jcenter.bintray.com/commons-codec/commons-codec/1.4/commons-codec-1.4.jar
Download http://jcenter.bintray.com/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.jar
Download http://jcenter.bintray.com/org/abego/treelayout/org.abego.treelayout.core/1.0.1/org.abego.treelayout.core-1.0.1.jar

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/Users/anthonybonello/Documents/Programming/JUCE_coding/GuiApp4Android/Builds/AndroidStudio/app/build.gradle’ line: 1

  • What went wrong:
    A problem occurred evaluating project ‘:app’.

org.gradle.api.Project.getPluginManager()Lorg/gradle/api/plugins/PluginManager;

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 9 mins 42.866 secs
Anthonys-MacBook-Pro:AndroidStudio anthonybonello$


#6

Can you paste your app/build.gradle?


#7

I added the .txt extension because otherwise it will not allow me to upload the files.
I also uploaded the other two files just in case they show anything useful (same applies for extensions).

build.gradle.txt (230 Bytes)
local.properties.txt (113 Bytes)
settings.gradle.txt (14 Bytes)

@Fabian
Please note There is another build.gradle file in the app directory
The previous one was in the AndroidStudio directory.

This is the one in the app directory:
build.gradle.txt (3.3 KB)


#8

Ahh ok that’s odd. The Projucer does not seem to detect the correct gradle plugin version. Open the .jucer file in the projucer and change gradle-version to 2.11 and gradle-experimental wrapper version to 0.8.0-alpha6:

The re-save the project and execute the commands I posted above (in the Builds/AndroidStudio folder):

cp /Applications/Android\ Studio.app/Contents/plugins/android/lib/templates/gradle/wrapper/gradlew .
chmod +x gradlew
cp /Applications/Android\ Studio.app/Contents/plugins/android/lib/templates/gradle/wrapper/gradle/wrapper/gradle-wrapper.jar gradle/wrapper/
./gradlew assemble

Let me know which errors you are getting. If you get no errors then Android Studio should be fine with it.


#9

This is the result:

Anthonys-MacBook-Pro:AndroidStudio anthonybonello$ cp /Applications/Android\ Studio.app/Contents/plugins/android/lib/templates/gradle/wrapper/gradlew .
Anthonys-MacBook-Pro:AndroidStudio anthonybonello$ chmod +x gradlew
Anthonys-MacBook-Pro:AndroidStudio anthonybonello$ cp /Applications/Android\ Studio.app/Contents/plugins/android/lib/templates/gradle/wrapper/gradle/wrapper/gradle-wrapper.jar gradle/wrapper/
Anthonys-MacBook-Pro:AndroidStudio anthonybonello$ ./gradlew assemble
Downloading https://services.gradle.org/distributions/gradle-2.11-all.zip

Unzipping /Users/anthonybonello/.gradle/wrapper/dists/gradle-2.11-all/ace7yl0a7udokebb27mt9s3qr/gradle-2.11-all.zip to /Users/anthonybonello/.gradle/wrapper/dists/gradle-2.11-all/ace7yl0a7udokebb27mt9s3qr
Set executable permissions for: /Users/anthonybonello/.gradle/wrapper/dists/gradle-2.11-all/ace7yl0a7udokebb27mt9s3qr/gradle-2.11/bin/gradle
Download https://jcenter.bintray.com/com/android/tools/build/gradle-experimental/0.8.0-alpha6/gradle-experimental-0.8.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.2.0-alpha6/gradle-core-2.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder/2.2.0-alpha6/builder-2.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint/25.2.0-alpha6/lint-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/build/gradle-api/2.2.0-alpha6/gradle-api-2.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/databinding/compilerCommon/2.2.0-alpha6/compilerCommon-2.2.0-alpha6.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.0.4/asm-5.0.4.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-parent/5.0.4/asm-parent-5.0.4.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-commons/5.0.4/asm-commons-5.0.4.pom
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.core/0.7.5.201505241946/org.jacoco.core-0.7.5.201505241946.pom
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.build/0.7.5.201505241946/org.jacoco.build-0.7.5.201505241946.pom
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.report/0.7.5.201505241946/org.jacoco.report-0.7.5.201505241946.pom
Download https://jcenter.bintray.com/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.pom
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
Download https://jcenter.bintray.com/com/google/google/1/google-1.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder-model/2.2.0-alpha6/builder-model-2.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder-test-api/2.2.0-alpha6/builder-test-api-2.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/sdklib/25.2.0-alpha6/sdklib-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/sdk-common/25.2.0-alpha6/sdk-common-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/common/25.2.0-alpha6/common-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/build/manifest-merger/25.2.0-alpha6/manifest-merger-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/25.2.0-alpha6/ddmlib-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.11.0/jack-api-0.11.0.pom
Download https://jcenter.bintray.com/com/android/tools/analytics-library/protos/25.2.0-alpha6/protos-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/analytics-library/shared/25.2.0-alpha6/shared-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/analytics-library/tracker/25.2.0-alpha6/tracker-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.4/asm-tree-5.0.4.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint-checks/25.2.0-alpha6/lint-checks-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.5.1/ecj-4.5.1.pom
Download https://jcenter.bintray.com/com/android/databinding/baseLibrary/2.2.0-alpha6/baseLibrary-2.2.0-alpha6.pom
Download https://jcenter.bintray.com/org/antlr/antlr4/4.5.3/antlr4-4.5.3.pom
Download https://jcenter.bintray.com/org/antlr/antlr4-master/4.5.3/antlr4-master-4.5.3.pom
Download https://jcenter.bintray.com/com/android/tools/annotations/24.5.0/annotations-24.5.0.pom
Download https://jcenter.bintray.com/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha6/layoutlib-api-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/dvlib/25.2.0-alpha6/dvlib-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/repository/25.2.0-alpha6/repository-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint-api/25.2.0-alpha6/lint-api-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.4/asm-analysis-5.0.4.pom
Download https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.pom
Download https://jcenter.bintray.com/com/google/jimfs/jimfs-parent/1.1/jimfs-parent-1.1.pom
Download https://jcenter.bintray.com/com/android/tools/external/com-intellij/uast/145.597.3/uast-145.597.3.pom
Download https://jcenter.bintray.com/com/android/tools/annotations/25.2.0-alpha6/annotations-25.2.0-alpha6.pom
Download https://jcenter.bintray.com/com/google/guava/guava/18.0/guava-18.0.pom
Download https://jcenter.bintray.com/com/google/guava/guava-parent/18.0/guava-parent-18.0.pom
Download https://jcenter.bintray.com/com/android/tools/build/gradle-experimental/0.8.0-alpha6/gradle-experimental-0.8.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.2.0-alpha6/gradle-core-2.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder/2.2.0-alpha6/builder-2.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint/25.2.0-alpha6/lint-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/build/gradle-api/2.2.0-alpha6/gradle-api-2.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/databinding/compilerCommon/2.2.0-alpha6/compilerCommon-2.2.0-alpha6.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-commons/5.0.4/asm-commons-5.0.4.jar
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.core/0.7.5.201505241946/org.jacoco.core-0.7.5.201505241946.jar
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.report/0.7.5.201505241946/org.jacoco.report-0.7.5.201505241946.jar
Download https://jcenter.bintray.com/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.jar
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder-model/2.2.0-alpha6/builder-model-2.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder-test-api/2.2.0-alpha6/builder-test-api-2.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/sdklib/25.2.0-alpha6/sdklib-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/sdk-common/25.2.0-alpha6/sdk-common-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/common/25.2.0-alpha6/common-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/build/manifest-merger/25.2.0-alpha6/manifest-merger-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/25.2.0-alpha6/ddmlib-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.11.0/jack-api-0.11.0.jar
Download https://jcenter.bintray.com/com/android/tools/analytics-library/protos/25.2.0-alpha6/protos-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/analytics-library/shared/25.2.0-alpha6/shared-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/analytics-library/tracker/25.2.0-alpha6/tracker-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.4/asm-tree-5.0.4.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint-checks/25.2.0-alpha6/lint-checks-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.5.1/ecj-4.5.1.jar
Download https://jcenter.bintray.com/com/android/databinding/baseLibrary/2.2.0-alpha6/baseLibrary-2.2.0-alpha6.jar
Download https://jcenter.bintray.com/org/antlr/antlr4/4.5.3/antlr4-4.5.3.jar
Download https://jcenter.bintray.com/com/android/tools/layoutlib/layoutlib-api/25.2.0-alpha6/layoutlib-api-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/dvlib/25.2.0-alpha6/dvlib-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/repository/25.2.0-alpha6/repository-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint-api/25.2.0-alpha6/lint-api-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.4/asm-analysis-5.0.4.jar
Download https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.jar
Download https://jcenter.bintray.com/com/android/tools/external/com-intellij/uast/145.597.3/uast-145.597.3.jar
Download https://jcenter.bintray.com/com/android/tools/annotations/25.2.0-alpha6/annotations-25.2.0-alpha6.jar
Download https://jcenter.bintray.com/com/google/guava/guava/18.0/guava-18.0.jar

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/Users/anthonybonello/Documents/Programming/JUCE_coding/GuiApp4Android/Builds/AndroidStudio/app/build.gradle’ line: 1

  • What went wrong:
    A problem occurred evaluating project ‘:app’.

java.lang.UnsupportedClassVersionError: com/android/build/gradle/model/AppComponentModelPlugin : Unsupported major.minor version 52.0

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 39 mins 18.55 secs
Anthonys-MacBook-Pro:AndroidStudio anthonybonello$


#10

Googling the error says you might have the wrong build tools version. Can you now try importing the AndroidStudio folder into Android Studio. There is a chance that Android Studio will sort it out.


#11

Hi @fabian,

I am not sure what you want me to do.

This is were I am:

I restarted a new project (always following the JUCE Android Tutorial).
I tried the normal way of sending the project from Producer to Android Studio - it does not work.
I tried the import project in Android Studio

Option: Import project from external model - says Gradle location incorrect. Tried to redirect to the gradle/wrapper - still says incorrect location

Option: Create project from existing source - The following Error message comes up:

Migrate Project to Gradle?
This project does not use the Gradle build system. We recommend that you migrate to using the Gradle build system. More Information about migrating to Gradle Don’t show this message again.

Although it does open the source code.

I am not sure if the problem is on the projucer side - I saw that there were other tutorial which had problems (ex. the zip file download for tutorial "The application Window"
or whether the problem lies on Android Studio’s side.
I was thinking of uninstalling Android Studio and start again but a quick google search shows that there is no straight forward way of uninstalling, requiring to manually removing a lot of files from various places.

Re tools: I did find references to this on google. I am not sure what it refers to as I have downloaded all the SDKs from Android 4 up. I downloaded NDK. See image below

I will wait for your reply before I try an uninstall.


#12

After having saved the project in the Projucer (with the gradle version/gradle-experiement wrapper version above), open Android studio, close all open projects and then select “Import Project (Eclipse, ADT, Gradle, etc.)”. Then select the AndroidStudio folder of your juce project. So, if your jucer file is located in Documents/MyAndroidProject/MyAndroidProject.jucer then you need to select the folder Documents/MyAndroidProject/Builds/AndroidStudio.


#13

@Fabian
I am getting this error.

Error:Gradle version 2.11 is required. Current version is 2.10. If using the gradle wrapper, try editing the distributionUrl in /Users/anthonybonello/Documents/Programming/JUCE_coding/AndroidPlugin02/Builds/AndroidStudio/gradle/wrapper/gradle-wrapper.properties to gradle-2.11-all.zip.

Please fix the project’s Gradle settings.
Fix Gradle wrapper and re-import project
Gradle settings

I will try to set a 2.11 Gradle.

Please note I removed the SDK 24 (The N version) It was included in various errors previously.

[[[ I installed Android Studio on my Windows Desktop but I am having trouble getting to work there. I am glad that according to the developers of this Android Studio this is an easier way to work compared to Eclipse based setup. I wonder how their more difficult IDE would be like. :slight_smile: ]]]]

Cheers.


#14

OK, some progress.

I arrived at the stage where I can start a new project in Android Studio. I can load it in a Virtual device without errors. I can do modifications to the GUI and reload it. It works.

When I try to import the project from Projucer I am getting the following error:
Error:Cause: com/android/build/gradle/internal/model/DefaultAndroidProject : Unsupported major.minor version 52.0

Any ideas?
Cheers.

PS I can send images of all the settings I have in Android Studio.


#15

@fabian
Got it to work.

I will try to retrace my steps.


#16

Update:

This has been solved. I hope the following may be useful to others.

The settings I have are the following
Min SDK 14
gradle version 2.10
gradle-experimental wrapper version 0.7.0-rc1
Android build tools version 24.0.1

Architectures armeabi armeabi-v7a x86

With these settings I managed to get the project open in Android Studio and runs on
AVD using arm but had problems with x86. [ see Error at the bottom of this post]
I also managed to get it to run on my Samsung Galaxy J3

I can either send it directly from Producer, or
using Import project in Android Studio. Please note, The directory needs to point to
YourProjucerProject/Builds/AndroidStudio.

One thing that I believe was crucial in making this to work was the removal of the Android 6.X(N) SDK.

(For completness, I am running on MacOSX 10.10.3)

[Error when trying to use the x86 AVD]
07/28 16:51:36: Launching app
The currently selected variant “armeabi-v7a-debug” uses split APKs, but none of the 1 split apks are compatible with the current device with density “420” and ABIs “x86”.
Error while Installing APK


#17

Have you switched the variant to x86-debug? Click on the build variants tab on the left side of the project browser in Android studio.


#18

Thanks @fabian

It works.