Android Studio Release vs Debug


#1

I used to be able to generate Release versions of Juce-generated (3.20) Android apps by using the "Generate Signed APK" command in the Android Studio Build menu.

It was a long and tedious process and now thanks to JUCE 4 I can directly generate the debug versions using Android Studio fairly easily, but not the release versions. As a matter of fact,  when I choose to enable only a release version (Android) in IntroJucer, when compiling I only see debug files generation (although files are created in the Release folder...). It was previously the case in JUCE 3.20 and that is why I was using the Generate Signed APK command, but now (using JUCE 4) if I try to use the Generate Signed APK the process ends up with the following error:


...
:app:transformClassesAndResourcesWithProguardForArmeabi-v7aRelease
Warning: Exception while processing task java.io.IOException: java.lang.ClassCastException: java.lang.String cannot be cast to java.io.File
:app:transformClassesAndResourcesWithProguardForArmeabi-v7aRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithProguardForArmeabi-v7aRelease'.
> java.io.IOException: java.lang.ClassCastException: java.lang.String cannot be cast to java.io.File
​

All of this is very confusing. Has anyone been able to generate a Release version with Android Studio ? Has anyone been able to use Generate Signed APK ? Again, this used to work when manually converting Juce 3.20 projects to comply with Android Studio format.


#2

You can change your project from Debug to Release in Android Studio by going to the Build Variants button (bottom left corner for me),

Hope this helps!


#3

Thank you for the answer Joshua. I was expecting that the correct build variant would be automatically selected when I only had one Configuration selected in IntroJucer (Release). Also that does not explain the errors I now get when I use the "Generate Signed APK" command. Do you get the same result or did I possibly do something wrong, which was working in Juce 3.20 and not anymore using Juce 4 ?

Thx.


#4

I get the same error here when building a release version of my app:

 

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithProguardForArmeabi-v7aRelease'.
> java.io.IOException: java.lang.ClassCastException: java.lang.String cannot be cast to java.io.File

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

BUILD FAILED

I'm running gradle from the command line because Android Studio keeps causes my system to freeze. It's driving me mad. The debug apk's build fine for me.


#5

Hi Rory,

Gradle build support for native code is a bit experimental right now and I've had different failures building release on different versions of gradle. However, I was able to consistently succesfully build android apps by wiping anything android related (sdk, ndk, gradle, android studio) and re-installing Android Studio 1.4.1 (see here). Any newer version seems to be causing problems whereas older versions have other bugs. 

We are in touch with Google and reporting any bugs we find in Android Studio and/or gradle.

Fabian


#6

Thanks Fabian. I'll give it a go. It's nice to have the Ant project options still available in the Introjucer. The Ant version is buiding without any problems for me in both configs.


#7

How did it go? I ask because I get the same error as you describe, namely:

* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithProguardForArmeabi-v7aRelease'.
> java.io.IOException: java.lang.ClassCastException: java.lang.String cannot be cast to java.io.File

Debug build works fine but I cannot build the release apk.

I have Android Studio 1.5 running on Windows. I will also try to build it on virtual Ubuntu and see if that make's any difference...


#8

FYI we're working on the same issue ourselves right now..


#9

Always have to google these shortcuts...

 

Anyway you do have this issue even on platforms other than Windows? I'm trying to run it on Ubuntu to see where the problem is, but the whole process in Virtual Ubuntu takes ages, so I'll let you know tomorow (probably).

 

Thanks

 

//Edit: no luck with running it on Ubuntu. I just cannot get the USB driver to work - probably some VBox bug.


#10

Any progress?

 

At this point I at least need to know, whether the release build is significantly faster than debug. The thing is that even using the OpenGL context trick I get something like 5 FPS for my GUI. I need to have more, this is too slow and it has too large an input lag. E.g. when I drag something, it always stays quite a distance behind my finger...

Thanks!


#11

Yes, release builds should work now - we've been using it ourselves for ROLI projects.

With the GL renderer we can happily get up 30-60fps in our fairly graphics-intensive app on the Nexus devices we've been testing with here.


#12

Thanks Jules, I'll try the last tip.


#13

Well, with latest tip, I get these errors:

 

com.intellij.execution.ExecutionException: Compiler exited with error code 1: e:\Libs\android-sdk\ndk-bundle\toolchains\llvm-3.6\prebuilt\windows-x86_64\bin\clang++ "-xc++" "-fno-rtti" "-fno-exceptions" "--sysroot=e:\\Libs\\android-sdk\\ndk-bundle/platforms/android-9/arch-arm" "-std=c++11" "-Ie:\\Libs\\android-sdk\\ndk-bundle\\sources\\cxx-stl\\llvm-libc++\\libcxx\\include" "-Ie:\\Libs\\android-sdk\\ndk-bundle\\sources\\cxx-stl\\gabi++\\include" "-Ie:\\Libs\\android-sdk\\ndk-bundle\\sources\\cxx-stl\\..\\android\\support\\include" "-gcc-toolchain" "e:\\Libs\\android-sdk\\ndk-bundle\\toolchains\\arm-linux-androideabi-4.9\\prebuilt\\windows-x86_64" "-target" "armv7-none-linux-android" "-fpic" "-ffunction-sections" "-funwind-tables" "-fstack-protector" "-no-canonical-prefixes" "-march=armv7-a" "-mfloat-abi=softfp" "-mfpu=vfpv3-d16" "-mthumb" "-Os" "-g" "-DNDEBUG" "-fomit-frame-pointer" "-fstrict-aliasing" "-O0" "-UNDEBUG" "-marm" "-fno-strict-aliasing" "-fno-limit-debug-info" "-fsigned-char" "-fexceptions" "-frtti" "-std=c++11" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE\\Builds\\AndroidStudio/app" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE\\Builds\\AndroidStudio/../../../../" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE\\Builds\\AndroidStudio/../../../..//modules" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/Source" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics/buffers" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics/effects" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics/midi" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics/mpe" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics/sources" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics/synthesisers" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_devices/audio_io" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_devices/midi_io" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_devices/sources" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_devices/audio_cd" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_devices/native" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_devices" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_formats/format" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_formats/codecs" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_formats/sampler" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_formats" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/text" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/maths" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/memory" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/containers" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/threads" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/time" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/files" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/network" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/streams" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/logging" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/system" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/xml" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/javascript" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/zip" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/unit_tests" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/misc" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/native" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_data_structures/values" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_data_structures/undomanager" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_data_structures/app_properties" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_data_structures" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_events/messages" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_events/timers" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_events/broadcasters" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_events/interprocess" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_events/native" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_events" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/colour" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/contexts" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/images" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/image_formats" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/geometry" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/placement" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/fonts" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/effects" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/native" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/components" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/mouse" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/keyboard" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/widgets" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/windows" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/menus" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/layout" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/buttons" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/positioning" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/drawables" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/properties" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/lookandfeel" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/filebrowser" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/commands" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/misc" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/application" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/native" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_extra/code_editor" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_extra/documents" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_extra/embedding" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_extra/misc" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_extra/native" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_extra" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_opengl/opengl" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_opengl/geometry" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_opengl/utils" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_opengl/native" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_opengl" "-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode" "-g" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_ANDROID=1" "-DJUCE_ANDROID_API_VERSION=10" "-DJUCE_ANDROID_ACTIVITY_CLASSNAME=com_yourcompany_straessermobilecontrolpaneljuce_StraesserMobileControlPanelJUCE" "-DJUCE_ANDROID_ACTIVITY_CLASSPATH=com/yourcompany/straessermobilecontrolpaneljuce/StraesserMobileControlPanelJUCE" "-O0" "-v" "-dD" "-E" clang version 3.6 Target: armv7-none-linux-android Thread model: posix Found candidate GCC installation: e:\Libs\android-sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64/lib/gcc/arm-linux-androideabi\4.9 Selected GCC installation: e:\Libs\android-sdk\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64/lib/gcc/arm-linux-androideabi/4.9 Candidate multilib: armv7-a/thumb/hard;@march=armv7-a@mhard-float@mthumb Candidate multilib: armv7-a/hard;@march=armv7-a@mhard-float Candidate multilib: armv7-a/thumb;@march=armv7-a@mthumb Candidate multilib: armv7-a;@march=armv7-a Candidate multilib: thumb;@mthumb Candidate multilib: .; Selected multilib: armv7-a;@march=armv7-a "e:\\Libs\\android-sdk\\ndk-bundle\\toolchains\\llvm-3.6\\prebuilt\\windows-x86_64\\bin\\clang++" -cc1 -triple armv7-none-linux-android -E -disable-free -main-file-name gcc-body0 -mrelocation-model pic -pic-level 1 -mthread-model posix -relaxed-aliasing -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu cortex-a8 -target-feature +soft-float-abi -target-feature +vfp3 -target-feature +d16 -target-feature -neon -target-abi aapcs-linux -mfloat-abi soft -target-linker-version 2.24 -v -g -dwarf-column-info -ffunction-sections -resource-dir "e:\\Libs\\android-sdk\\ndk-bundle\\toolchains\\llvm-3.6\\prebuilt\\windows-x86_64\\bin\\..\\lib\\clang\\3.6" -D NDEBUG -U NDEBUG -D DEBUG=1 -D _DEBUG=1 -D JUCE_ANDROID=1 -D JUCE_ANDROID_API_VERSION=10 -D JUCE_ANDROID_ACTIVITY_CLASSNAME=com_yourcompany_straessermobilecontrolpaneljuce_StraesserMobileControlPanelJUCE -D JUCE_ANDROID_ACTIVITY_CLASSPATH=com/yourcompany/straessermobilecontrolpaneljuce/StraesserMobileControlPanelJUCE -D ___CIDR_IGNORE_DEFINITIONS_START -I "e:\\Libs\\android-sdk\\ndk-bundle\\sources\\cxx-stl\\llvm-libc++\\libcxx\\include" -I "e:\\Libs\\android-sdk\\ndk-bundle\\sources\\cxx-stl\\gabi++\\include" -I "e:\\Libs\\android-sdk\\ndk-bundle\\sources\\cxx-stl\\..\\android\\support\\include" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE\\Builds\\AndroidStudio/app" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE\\Builds\\AndroidStudio/../../../../" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE\\Builds\\AndroidStudio/../../../..//modules" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/Source" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics/buffers" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics/effects" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics/midi" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics/mpe" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics/sources" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics/synthesisers" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_devices/audio_io" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_devices/midi_io" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_devices/sources" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_devices/audio_cd" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_devices/native" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_devices" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_formats/format" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_formats/codecs" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_formats/sampler" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_formats" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/text" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/maths" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/memory" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/containers" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/threads" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/time" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/files" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/network" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/streams" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/logging" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/system" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/xml" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/javascript" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/zip" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/unit_tests" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/misc" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core/native" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_core" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_data_structures/values" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_data_structures/undomanager" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_data_structures/app_properties" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_data_structures" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_events/messages" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_events/timers" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_events/broadcasters" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_events/interprocess" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_events/native" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_events" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/colour" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/contexts" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/images" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/image_formats" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/geometry" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/placement" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/fonts" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/effects" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics/native" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_graphics" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/components" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/mouse" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/keyboard" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/widgets" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/windows" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/menus" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/layout" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/buttons" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/positioning" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/drawables" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/properties" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/lookandfeel" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/filebrowser" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/commands" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/misc" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/application" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics/native" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_basics" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_extra/code_editor" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_extra/documents" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_extra/embedding" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_extra/misc" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_extra/native" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_gui_extra" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_opengl/opengl" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_opengl/geometry" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_opengl/utils" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_opengl/native" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_opengl" -I "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode" -isysroot "e:\\Libs\\android-sdk\\ndk-bundle/platforms/android-9/arch-arm" -internal-isystem "e:\\Libs\\android-sdk\\ndk-bundle/platforms/android-9/arch-arm/usr/local/include" -internal-isystem "e:\\Libs\\android-sdk\\ndk-bundle\\toolchains\\llvm-3.6\\prebuilt\\windows-x86_64\\bin\\..\\lib\\clang\\3.6\\include" -internal-externc-isystem "e:\\Libs\\android-sdk\\ndk-bundle/platforms/android-9/arch-arm/include" -internal-externc-isystem "e:\\Libs\\android-sdk\\ndk-bundle/platforms/android-9/arch-arm/usr/include" -O0 -std=c++11 -fdeprecated-macro -fdebug-compilation-dir "D:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE\\Builds\\AndroidStudio\\app" -ferror-limit 19 -fmessage-length 0 -fstandalone-debug -stack-protector 1 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -dD -o - -x c++ "C:\\Users\\Aros\\AppData\\Local\\Temp\\gcc-body0" clang++: error: unable to execute command: program not executable

This line is there 2752 times in case it matters :-)

 

I also get some exceptions. See here : https://onedrive.live.com/redir?resid=23FE630A02A6BB8!63962&authkey=!AJ7Gz0joJ2Cb5W0&v=3&ithint=photo%2cPNG

 

It does the same thing for release and debug. The debug configuration used to work before i pulled the new version. I guess it has something to do with Timur's recent commit...

 

I still have the 1.5 version of Android studio. Should I upgrade, or am I more likely to be fine with this version?

 

Thanks

 

 


#14

No idea - you're deep in Android Studio land there. It might be worth upgrading to V2, that's what we're using here and it seems better overall.

Also, trying to use Windows is... brave. The whole build chain is clearly designed with unix platforms in mind, and who knows whether it's stable on Windows yet. We don't run it on Windows ourselves, so you're in uncharted waters.


#15

Yes, I've been told that by Timur as well. The thing is that I would have to get some other computer and install Ubuntu there. It seems impossible to run working AS setup in VirtualBox (although Timur claims otherwise) and I may be brave to use Windows for Android development, but I am not brave enough to run dual boot. Not anymore anyway.

 

I will try AS 2 and let you know then.


#16

I updated to 1.5.1 instead of 2.0 (it somehow doesn't want to update to canary releases), anyway I found the problem. As expected it is caused by the recent Timur's commit: https://github.com/julianstorer/JUCE/commit/ecc4c7d492d12c94c531a88c1a7f58011177ca34

 

If I replace these lines:


stl = "c++_static"

toolchain = "clang"

toolchainVersion = 3.6

 

with these lines:

stl = "gnustl_static"

toolchainVersion = 4.9

It does not crash anymore.

 

One more thing though: How do you deal with additional include directories for Android Studio? I have filled in the field in Introjucer but it seems to have no effect on gradle build.


#17

I'll explain my problem a little bit further:

I added to my project some external dependencies. I specified some additional include path in Introjucer in "Header search paths" for both VS exporter and AS exporter. For VS this of course works fine. But AS project complains it cannot find those headers and I am not able to build in AS anymore...

 

I don't think that this is a problem with me using AS on Windows but rather that of Introjucer exporter for AS. There are these lines in the gradle project:


cppFlags.add("-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/Source".toString())

cppFlags.add("-ID:\\Dokumenty\\Projects\\Straesser\\StraesserMobileControlPanelJUCE/JuceLibraryCode/modules/juce_audio_basics/buffers".toString()) 
... //and more for all the JUCE modules used in the project

But there should as well probably be something like:


cppFlags.add("-ID:\\Path\\to\\some\\additional/directories/specified/in/introjucer".toString())

But that line is just not there. Is it possible that Introjucer exporter for AS ignores the field Header search paths?

 


#18

Yep, I'll fix this asap.

I just also noticed the fact that the clang toolchain crashes on Windows. I have flagged this issue with Google's Android Studio people (they were the ones who recommended to use the clang toolchain), so maybe there will be a fix. For the time being, yes please use gcc instead of clang on Windows.

If it turns out that there will be no fix for clang on Windows, I'll probably add a build setting in the Introjucer where you can pick clang or gcc, so you don't have to edit your build.gradle manually.

But, to be perfectly honest with you, here's again my advice:

If you plan to develop Android apps professionally, do not use Windows.

Seriously, don't use Windows. Make a partition that runs Ubuntu, or use a Mac. You'll be a much happier Android developer.


#19

Thanks Timur, I'll wait for the additional include path fix. And yes, I will use the GCC in the meantime.

 

I take you advice regarding the Windows being bad as Android development platform, however I just don't understand why an OS which is absolutely dominating the PC market get's such a bad support for Android development. As you say, if I at some point decide to do Android apps professionally, I will install ubuntu (probably on another PC, I have a some bad experience with dual boot). Right now I am just trying to find out if it is possible to achieve what I want with JUCE on Android.

 

And I am not exactly using the AS on Windows for Android development. I am just using it to build the Android version of the App and all the development actually takes place in VS.


#20

I fixed the Additional Include paths now (as well as the additional library search paths which were broken as well). Hope it works for you.