- Home /
Question by
ShmulikGH · Aug 03, 2016 at 01:18 PM ·
android builderror buildnativepermissions
Can't create an APK after exporting to AndroidStudio Project
Hi everyone, Recently, Google started to demand asking for permissions on runtime (android 6.0). So in order to do so, I have to export an Android Studio project out of my Unity3D project, and remove the automatically added permissions, such as READ_PHONE_STATE, and require them later in the game.
The problem is, that I can't create an APK file, out of the project. Can't even run it because AS fails to build the project. The first problem I dealt with, was: at last, I just removed all "compile project("xyz")" lines that contained Google play services, on build.gradle. and then I got an error I could not solve:
:myApp:transformClassesWithDexForRelease
To run dex in process, the Gradle daemon needs a larger heap.
It currently has approximately 910 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]}
AGPBI: {"kind":"error","text":"unsupported class file version 52.0","sources":[{}]}
AGPBI: {"kind":"error","text":"...while parsing com/heyzap/UnusedStub.class","sources":[{}]}
AGPBI: {"kind":"error","text":"1 error; aborting","sources":[{}]}
:myApp:transformClassesWithDexForRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':myApp:transformClassesWithDexForRelease'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
any help from here? thanks!
screen-shot-2016-08-03-at-9.jpg
(54.8 kB)
screen-shot-2016-08-03-at-100550-am.png
(28.6 kB)
Comment