Exporting a build from Unity to Android fails - android

I'm new to coding and to Unity. I've followed the step-by-step found in this google page. I have installed all the SDKs and the latest versions of Unity and Android Studio for mac OS.
Everything goes according to plan and I get to the final "run and build". It connects fine to my Note 3 and runs almost to the end when I get the following errors:
Error message window
Assets/GoogleVR/Scripts/VRDevices/GvrDevice.cs(99,10): warning CS0618: `UnityEngine.GL.IssuePluginEvent(int)' is obsolete: `IssuePluginEvent(eventID) is deprecated. Use IssuePluginEvent(callback, eventID) instead.'
and
CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details. /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java
-Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/Bruno.Vilela/Library/Android/sdk/tools"
-Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar"
-
I have tried all that I am able to and have found no way around this. I am simply not versed enough in C# to debug this on my own. Any help will be greatly appreciated!!
SPECS:
Macbook Pro running OS X 10.10.5
Unity 5.3.4f1 Personal
Android Studio 2.1.1
Galaxy Note 3 running Android 5.0
Cheers!!
-BV

This might be caused due to having duplication jar files in your project. check if that is true, try removing any duplication and building the project again.
some similar reference : http://answers.unity3d.com/questions/765961/multiple-plugin-conflict.html

Related

Lime 5.2.1 / Android 4.3 : dlopen fails on stpcpy

I'm trying to build an empty HaxePunk project for Android to test the build chain, and while I'm never getting any error, all my attemps have crashed at run time with the same error message :
Error: dlopen failed: cannot locate symbol "stpcpy" referenced by libzlib.so...
I am running the executable on a pretty old phone with Android 4.3 on it ; a Sony Xperia M.
I have been doing a bit of research, and so far I mostly see the same things being repeated : update your NDK (I've been using the latest one from the android dev website and not the one lime setup android downloads), build for previous API versions (which I am also doing with <config:android target-sdk-version="18" /> in my project.xml file). So I don't know what I'm doing wrong, if anything.
Another thing I found is that I'm using the git version of HXCPP, and when I built the Android libs with neko build.n android in the project subdir, it was using -DHXCPP_ANDROID_PLATFORM=26 whereas the Lime build of my project is using -DHXCPP_ANDROID_PLATFORM=9, so that can't be good. However, I don't really know much about Android at all, but I have read that the SDK version and Android platform are two different things, or so I've read.
Any help with this will be much appreciated.
EDIT : Okay so something weird happened : up until now I was trying to install the APK manually by copying it to my phone's files and launching it from there, which kept crashing. I tried lime test android once without changing anything at all and it worked fine, and from then I could manually install the APK like I used to, and the error never happened again. I can't replicate it, but it's still an open case.

Robotium: Could not find XXX.apk

I am very new to Robotium tool. I am facing issue for the execution of first test in Robotium. Please help
Step1:
I created Android virtual device in using eclipse and ADT.
Details: Android 5.1.1 - API level 22
CPU - ARM
Virtual device created and launched successfully.
Step2:
Then Installed application apk using command line
details: adb install path-of-apk\XXX.apk
Step3
Created Android Test project. Imported Robotium SOLO jar as external library.
Android.jar is under Android 5.1.1
Robotium jar is under Referenced libraries
Step4
Changed Target package to correct one captured from Hierarchical view
Step5
Created test class and tried to execute it using Android JUNIT
Error i am getting is
[2015-12-12 01:22:50 - Robotium_Calc] Android Launch!
[2015-12-12 01:22:50 - Robotium_Calc] adb is running normally.
[2015-12-12 01:22:50 - Robotium_Calc] Could not find XXX.apk!
Update: I am using Windows OS and Java 1.7
Sorry. May be this question has been asked several times here but i could not find solution which solve my problem.
Please help.
Thanks in advance.
Probably your .APK has not been generated inside /gen/bin/ folder, check first if your project doesn´t have any errors.
I you don´t have any errors just make a Refresh -> Build
it seems to be a problem with your Android configuration in Eclipse IDE. Try to solve by using solutions from:
Android Eclipse - Could not find *.apk
I'm not already using Robotium, but please check also a configuration for your Robotium library. Read (if you haven't done yet) this great tutorial:
http://www.vogella.com/tutorials/Robotium/article.html
EDIT: if you still not have a problem fixed read these:
https://groups.google.com/forum/#!msg/phonegap/ok44ta96GZc/YrNH3BKKVjgJ
http://mobilemancer.com/2010/12/01/could-not-find-yourapp-apk/
http://azeemhassan.com/find-helloworld-apk/
Well, according to this site I can say that is a quite often problem with Eclipse bad configuration
Thanks for your responses.
However i think i was facing the issue because there was incompatibility between eclipse, JDK and Android version i was using.
Initial config : Eclipse Indigo, JDK1.7 and Android 5.1.1 - API level 22
I changed configuration to: Eclipse Luna, JDK 1.7 and Android 5.1.1 - API level 22
So updating Eclipse to Luna solved my issue.

Android Studio Blank Activity Compilation Fails

I have been coding for a few years now and decided it was time to sink my teeth into android development. So I downloaded the latest version of Android Studio and installed all the relevant components with the installer.
However when i try to create a new project, using the blank activity, without even changing a single line of code, or editing the project in any way, the compile fails with the below error:
android execution failed for task :app:packageDebug
> Implementing Class
I have no idea of to fix this, any help would be greatly appreciated.
Thanks
I have been having the same error message. This is what I have found out:
I have a Mac Book Air with a Custom OS Image installed (from work) and on this computer I see the same error message above even from a fresh install (custom image) and fresh install of JavaRE and JDK as per the Android Studio System Requirements. Also a fresh install of Android Studio using a Blank activity with no additional lines of code.
However, I reinstalled OS X 10.10 from scratch, straight from the App store, with no OS customizations, installed the same JavaRE, JDK and Android Studio and the Error message did not appear.
I have been scratching my head over this error for a while now and this is the only solution that I have found. I'll keep digging and report back if I find a better solution.

GStreamer cant be resolved error in eclipse

I've imported the tutorials from the gst-sdk folder in eclipse. But even after adding native support, i'm getting the error import to gstreamer cant be resolved.
The error is basically make.exe has stopped working. Hence, eclipse closes. So,i think the root problem occurs during th e phase of add native support. After that only, am not able to build my application or solve the errors.
There are currently issues with building ndk applications in Eclipse if you use Eclipse Juno or are running on Windows see the Using the NDK Plugin page for more information.
I have been able to get the tutorials to build and run by disabling the CDT builder in the Eclipse project and building the GStreamer libraries by running ndk-make via the command line. You can find more information in this post.

Stella SDK convert to android

I'm trying to use the stella SDK to convert my iOS app made in cocos2d 1.1 rc0 to an android project. When I use the method on here: http://www.yeecco.com/support/docs/getting_started#portingiosprojectswithstellasdk
I get the error: Lexical or pre-processor Issue: 'GL/gl.h' file not found
This occurs even when I follow part one of the tutorial in which you convert the GLSprite test project to an android project. I have no idea how to solve this issue, especially as the issue is occurring in the same file that it says isn't included!...
Here's a screenshot
The problem has been tearing me. And I finally found the SDKROOT should be OS X 10.7 .
Set TARGETS-> Build-> Settings-> SDKROOT-> OS X 10.7.
And then install X11 http://xquartz.macosforge.org/landing/
after installing, you log out of account from mac, log in again and run this project.
That's all!
I found a fix.
On the Xcode project generated by StellaSDK, set the Base SDK for the target to OS X 10.7. Then add this to the “Header Search Paths” field in your target's build settings:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/X11/include
You will also need to install XQuartz following Apple instructions for it to work.
Cheers!

Categories

Resources