Quantcast
Channel: Android Mode - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 941

Can't build android app with processing

$
0
0

Hello, I'm trying to get Processing 3.3.6 to work with Android Mode 4.0. With the Android SDK 3.0.1, target API level 26/min. If someone could help me get it to work I'd be very happy, but just as well would be if someone knows of a working (preferably recent) combination of Processing, Android Mode and Android SDK that I could work with.

When building I get this error: _"Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence. java.lang.IllegalStateException: buildToolsVersion is not specified. ... FAILURE: Build failed with an exception.

  • Where: Build file 'C:\Users\Fredrik\AppData\Local\Temp\android971185864472813018sketch\app\build.gradle' line: 5

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

    Invalid revision: android-7.0 ...

BUILD FAILED in 10s org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.0-bin.zip'. ... Caused by: org.gradle.internal.exceptions.LocationAwareException: Build file 'C:\Users\Fredrik\AppData\Local\Temp\android971185864472813018sketch\app\build.gradle' line: 5 A problem occurred evaluating project ':app'. ... Caused by: java.lang.NumberFormatException: Invalid revision: android-7.0 ..."_

What I tried to do: Reading the forums - Found a suggestion to fill in something under "package name" in the manifest file, did so. Changing the gradle file - At this point I noticed that Processing generates a new gradle file every time I try to build, so I have no way of changing the gradle file for use with Processing. Exporting the project to Android Studio - Here I could edit the gradle file, but it gave me some warnings that "this support library should not use a different version than the compiledSDKVersion (26)..." but renaming it didn't help. I also tried a) removing the "buildToolsVersion" since I read it was deprecated, and then changing it to "26.0.2" when I got complaints that there was no buildtool present. There were also some warnings about there being dependencies based on different builds, such as ...vector drawable and what else can be found in the "libs" folder where the processing-core.jar file is located.

This way I got as far as: _"FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. > java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex"_

Which I tried to fix with adding: defaultConfig{ ... multiDexEnabled true ...}

dependencies { implementation 'com.android.support:multidex:1.0.2' ...}

This finally gave me the error where I decided it was time to ask for help: "Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.

java.io.IOException: Can't write [C:\Users...\Processing\Sketches\MySketch\android\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users....gradle\caches\transforms-1\files-1.1\appcompat-v7-26.0.2.aar\d3fd61d402d7b6cb2538ad98c0c186e4\jars\classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/v7/graphics/drawable/DrawerArrowDrawable.class]))"

At this point I'm not sure what to do and any help would be appreciated!


Viewing all articles
Browse latest Browse all 941

Trending Articles