Disable SDK build by default (maybe Travis can handle it then)

Fix compile error in jme3-android project
experimental
shadowislord 10 years ago
parent 5f84147154
commit d8c5985a73
  1. 4
      gradle.properties
  2. 12
      jme3-android/src/main/java/com/jme3/asset/plugins/AndroidLocator.java

@ -6,13 +6,13 @@ jmeMainVersion = 3.1
jmeVersionTag = snapshot-github jmeVersionTag = snapshot-github
# specify if SDK and Native libraries get built # specify if SDK and Native libraries get built
buildSdkProject = true buildSdkProject = false
buildNativeProjects = false buildNativeProjects = false
buildAutogen = false buildAutogen = false
# Path to android NDK for building native libraries # Path to android NDK for building native libraries
#ndkPath=/Users/normenhansen/Documents/Code-Import/android-ndk-r7 #ndkPath=/Users/normenhansen/Documents/Code-Import/android-ndk-r7
ndkPath = D:/android/android-ndk-r8e ndkPath = /opt/android-ndk-r10c
# Path for downloading native Bullet # Path for downloading native Bullet
bulletUrl = http://bullet.googlecode.com/files/bullet-2.82-r2704.zip bulletUrl = http://bullet.googlecode.com/files/bullet-2.82-r2704.zip

@ -1,9 +1,11 @@
package com.jme3.asset.plugins; package com.jme3.asset.plugins;
import android.content.res.AssetFileDescriptor;
import com.jme3.asset.*; import com.jme3.asset.*;
import com.jme3.system.android.JmeAndroidSystem; import com.jme3.system.android.JmeAndroidSystem;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
public class AndroidLocator implements AssetLocator { public class AndroidLocator implements AssetLocator {
@ -13,7 +15,7 @@ public class AndroidLocator implements AssetLocator {
private android.content.res.AssetManager androidManager; private android.content.res.AssetManager androidManager;
private String rootPath = ""; private String rootPath = "";
private class AndroidAssetInfo extends AssetInfo { public class AndroidAssetInfo extends AssetInfo {
private InputStream in; private InputStream in;
private final String assetPath; private final String assetPath;
@ -24,6 +26,14 @@ public class AndroidLocator implements AssetLocator {
this.in = in; this.in = in;
} }
public AssetFileDescriptor openFileDescriptor() {
try {
return androidManager.openFd(assetPath);
} catch (IOException ex) {
throw new AssetLoadException("Failed to open asset " + assetPath, ex);
}
}
@Override @Override
public InputStream openStream() { public InputStream openStream() {
if (in != null){ if (in != null){

Loading…
Cancel
Save