Giter Club home page Giter Club logo

Comments (2)

nicoostendorf avatar nicoostendorf commented on June 24, 2024

You need to edit the <path_to_ella>/ella/runtime/GuessDefaultSettingsTask.java file.
You need to set the file path hard, because the dynamic reading doesn't work for everyone..

Your new file have to look like this:

import org.apache.tools.ant.*;
import org.apache.tools.ant.taskdefs.*;

import java.util.*;
import java.io.*;

public class GuessDefaultSettingsTask extends Task
{
	public void execute() throws BuildException
	{
		String sdkPath = findAndroidSDKPath();
		String btPath = getProject().getProperty("ella.android.buildtools.dir");
		if(btPath == null){
			btPath = findAndroidBuildToolsPath(sdkPath);
			System.out.println("path to build-tools directory: "+btPath);			
		}
		File dxPath = new File(btPath, "dx");
		if(!dxPath.isFile())
			throw new Error("The configuration variable android.buildtools.dir is probably not set correctly. Current value is "+btPath);
		getProject().setProperty("ella.android.buildtools.dir", btPath);
		String androidJarPath = getProject().getProperty("ella.android.jar");
		if(androidJarPath == null){
			androidJarPath = findAndroidJarPath(sdkPath);
			if(androidJarPath == null)
				throw new Error("Could not automatically infer path to android.jar. Set ella.android.jar variable in the .settings file.");
			getProject().setProperty("ella.android.jar", androidJarPath);
		}
	}
	
	String findAndroidSDKPath() 
	{
		File sdk = new File("/Users/nicoostendorf1/Library/Android/sdk");
		return sdk.getPath();
	}

	String findAndroidBuildToolsPath(String sdkPath)
	{
		File buildToolsDir = new File("/Users/nicoostendorf1/Library/Android/sdk/build-tools/25.0.0");
		return buildToolsDir.getPath();
	}

	String findAndroidJarPath(String sdkPath)
	{
		File jarfile = new File("/Users/nicoostendorf1/Library/Android/sdk/platforms/android-25/android.jar");
		return jarfile.getPath();
	}
}

You need to set your file path!!!

from ella.

SioYooo avatar SioYooo commented on June 24, 2024

You need to edit the <path_to_ella>/ella/runtime/GuessDefaultSettingsTask.java file. You need to set the file path hard, because the dynamic reading doesn't work for everyone..

Your new file have to look like this:

import org.apache.tools.ant.*;
import org.apache.tools.ant.taskdefs.*;

import java.util.*;
import java.io.*;

public class GuessDefaultSettingsTask extends Task
{
	public void execute() throws BuildException
	{
		String sdkPath = findAndroidSDKPath();
		String btPath = getProject().getProperty("ella.android.buildtools.dir");
		if(btPath == null){
			btPath = findAndroidBuildToolsPath(sdkPath);
			System.out.println("path to build-tools directory: "+btPath);			
		}
		File dxPath = new File(btPath, "dx");
		if(!dxPath.isFile())
			throw new Error("The configuration variable android.buildtools.dir is probably not set correctly. Current value is "+btPath);
		getProject().setProperty("ella.android.buildtools.dir", btPath);
		String androidJarPath = getProject().getProperty("ella.android.jar");
		if(androidJarPath == null){
			androidJarPath = findAndroidJarPath(sdkPath);
			if(androidJarPath == null)
				throw new Error("Could not automatically infer path to android.jar. Set ella.android.jar variable in the .settings file.");
			getProject().setProperty("ella.android.jar", androidJarPath);
		}
	}
	
	String findAndroidSDKPath() 
	{
		File sdk = new File("/Users/nicoostendorf1/Library/Android/sdk");
		return sdk.getPath();
	}

	String findAndroidBuildToolsPath(String sdkPath)
	{
		File buildToolsDir = new File("/Users/nicoostendorf1/Library/Android/sdk/build-tools/25.0.0");
		return buildToolsDir.getPath();
	}

	String findAndroidJarPath(String sdkPath)
	{
		File jarfile = new File("/Users/nicoostendorf1/Library/Android/sdk/platforms/android-25/android.jar");
		return jarfile.getPath();
	}
}

You need to set your file path!!!

Thanks a lot, it worked on my Mac.

from ella.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.