Android SDK

Hi,

I would like to test fuse on Android too and I already have ant and the Android SDK installed. However the SDK manager doesn’t see any of them.

Is there any way to specify the path so we don’t endup with a duplicate android installation?

Thank you.

The default SDK search paths can be changed in:

  • /usr/share/uno/SDKs/.sdkconfig (OSX)
  • %PROGRAMDATA%\uno\SDKs\.sdkconfig (Windows)

Please be aware that there could be some dependencies on specific versions of the SDKs but it’s definitely worth testing out. :slight_smile:

Hi Remi,

Thanks for pointing out that config file. Sadly, it is overwritten every time I start Fuse (on Windows at least). Is there any way to persist changes to that file?

Sorry for that, it’s been a while since I looked at this. There’s another config file for the SDK downloader paths but it doesn’t seem to be respected right now. I’ll check up on this and get back to you.

Finally located the correct config file. :slight_smile:

  • Windows: %appdata%/../Local/FuseTools/Fuse/sdkConfig.json
  • OSX: ~/.fuse/sdkConfig.json

Thanks Remi, that’s very useful!

Sorry for the late reply. It seems that it doesn’t find the SDK. It does see however the NDK.

My settings file is

{
    "AndroidSDK":
    {
        "Path": "/Work/sdks/android-sdk-macosx",
        "API": "22"
    },

    "AndroidNDK":
    {
        "Path": "/Work/sdks/android-ndk-r10d"
    },

    "JDK":
    {
        "Path": "/Library/Java/JavaVirtualMachines",
        "PathPattern": "*.jdk"
    },

    "Ant":
    {
        "Path": "/Work/sdks/apache-ant-1.9.4/bin"
    }
}

And I’m attaching a screenshot of my current setup. Any ideas?

Thank you :slight_smile:

I also had some troubles with SDK Downloader not finding my installed Android SDK (PC)…by after changing the API-version it now finds it. Don´t know if this helps anyone…but just thought I’d share…

Currently it’s best to just use API version 19 (e.g. keep "API": "19" unchanged in the config file) and let the SDK downloader install it if you don’t already have it. (It won’t overwrite anything you’ve already got installed).

We’ll do more testing of other API versions later but right now this is the way to go. :slight_smile:

Hi guys, you’re doing a great job! I just installed Fuse, integrated successfully with sublime and run a few examples.

I have a few issues with Android SDK.

I installed both SDK and NDK, but…

The SDK manager is missing from the Utilities menu. Also the ~/.fuse folder doesn’t exist (checked with ls -al). And of course Fuse doesn’t build.

I tried to reinstall fuse but nothing happens…

Any idea?

Thanks! Leonardo

Hi Leonardo!

The installation of Android SDKs has changed as of version 0.5.3564 : https://www.fusetools.com/developers/forums/general/fuse_beta_release_053564

In short, to install all needed components just do fuse install android

To check the status of your SDK (without changing it) you can do fuse install -s android

Sorry for the lag in updating the online docs, will be fixed today!

Hi Remi, thank you! I managed to install Android SDK, now testing, will revert.

edit - SDK build is working now!!

Leonardo

Hi Fuse Team.

I had also invisible ‘utilities->install android sdk’. So, follow Remi’s advice

I installed new Fuse version 0.5.3715 in my windows 7 computer. And typed ‘fuse install android’. So I successful installed Android SDK also.

But I faced the other problem. When I tried build android apk :

D:\cs\fuse\test>fuse build --target=Android

C:\ProgramData\Uno\SDKs\AndroidNDK\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\bin\arm-linux-androideabi-g++.exe -O0 -g -DDEBUG -D_DEBUG -DDUK_F_32BIT_PTRS -DDUK_F_USE_ REPL_ALL -Iinclude -IC:/ProgramData/Uno/Packages/UnoCore/0.4.0/Targets/CPlusPlus/Prebuilt/Android/Xli/include --sysroot=C:/ProgramData/Uno/SDKs/AndroidNDK/platforms/android-9/arch- arm -DANDROID -fdata-sections -ffunction-sections -finline-limit=64 -fno-strict-aliasing -fomit-frame-pointer -fpic -fsigned-char -funwind-tables -isystem C:/ProgramData/Uno/SDKs/A ndroidNDK/sources/cxx-stl/stlport/stlport -isystem C:/ProgramData/Uno/SDKs/AndroidNDK/platforms/android-9/arch-arm/usr/include -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mt humb -no-canonical-prefixes -Wa,–noexecstack -Wno-psabi -fexceptions -frtti -isystem C:/ProgramData/Uno/SDKs/AndroidNDK/sources/cxx-stl/stlport/stlport -Wno-invalid-offsetof -LC:/ ProgramData/Uno/Packages/UnoCore/0.4.0/Targets/CPlusPlus/Prebuilt/Android/Xli/lib/android/armeabi-v7a -landroid -lEGL -lGLESv2 -llog -lXli -lXliFont -lXliGL -lXliImage -lXliMain -l XliPlatform -lXliZip -Wl,–fix-cortex-a8 -Wl,–gc-sections -Wl,–no-undefined -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -shared -Wl,-soname,libtest.so -o obj/libtest.so link.x C:/ ProgramData/Uno/SDKs/AndroidNDK/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_static.a C:/ProgramData/Uno/Packages/UnoCore/0.4.0/Targets/CPlusPlus/Prebuilt/Android/Xli/lib/an droid/armeabi-v7a/libXliMain.a C:\ProgramData\Uno\SDKs\AndroidNDK\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\bin\arm-linux-androideabi-strip.exe -o libs/armeabi-v7a/libtest.so obj/libtest.so

# Pre-Build Tasks

# Building APK Buildfile: D:\cs\fuse\test.build\Android-Debug\build.xml

BUILD FAILED D:\cs\fuse\test.build\Android-Debug\build.xml:90: The following error occurred while executing this line: C:\ProgramData\Uno\SDKs\AndroidSDK\tools\ant\build.xml:111: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1149) at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1320) at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1376) at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1337) at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1089) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:579) at org.apache.tools.ant.taskdefs.Definer.loadProperties(Definer.java:408) at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:264) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:169) at org.apache.tools.ant.taskdefs.ImportTask.importResource(ImportTask.java:222) at org.apache.tools.ant.taskdefs.ImportTask.execute(ImportTask.java:163) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:180) at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93) at org.apache.tools.ant.Main.runBuild(Main.java:828) at org.apache.tools.ant.Main.startAnt(Main.java:235) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)

Total time: 0 seconds (exit code: 1)

: EUNKNOWN: Native target failed to build

Build completed in 24.10 seconds 0 Warning(s) 1 Error(s)

Error Summary

-------------

: EUNKNOWN: Native target failed to build FATAL ERROR: Build failed.

Hi curtis,

It sounds like you may need to update your java. Minimum Java 1.6 is required.

Ref: http://stackoverflow.com/questions/9879801/eclipse-android-sdk-bad-version-number-in-class-file

I also have the same error (EUNKNOWN: Native target failed to build) and just ran the fuse install android, my java is 1.8. Any ideas as to the cause?