UniversalAvenue / TiCrosswalk

WebView replacement for Titanium Mobile
Other
27 stars 12 forks source link

Cannot compile for SDK4.* #15

Open AppWerft opened 8 years ago

AppWerft commented 8 years ago

Hi,

I need your awesome module for a 4.1.1. project and I have downloaded your zip. After ant comes:

rainers-mbp:android fuerst$ ant
Buildfile: /Users/fuerst/Downloads/TiCrosswalk-master/android/build.xml

BUILD FAILED
/Users/fuerst/Downloads/TiCrosswalk-master/android/build.xml:37: Cannot find /Users/fuerst/Downloads/TiCrosswalk-master/android/module/android/build.xml imported from /Users/fuerst/Downloads/TiCrosswalk-master/android/build.xml

I miss the configuration file for pointing to my SDKs …

jonatansberg commented 8 years ago

The latest release and the master branch are Ti 5.0.1+, to build for an earlier version you will need update the minsdk in the manifest file accordingly.

Also make sure you have a proper .classpath file set up. Mine looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="android/src"/>
    <classpathentry kind="src" path="android/build/.apt_generated"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry kind="lib" path="/Users/jonatanlundin/Code/Android/platforms/android-14/android.jar"/>
    <classpathentry kind="lib" path="/Users/jonatanlundin/Library/Application Support/Titanium/mobilesdk/osx/3.4.1.GA/android/titanium.jar"/>
    <classpathentry kind="lib" path="/Users/jonatanlundin/Library/Application Support/Titanium/mobilesdk/osx/3.4.1.GA/android/kroll-common.jar"/>
    <classpathentry kind="lib" path="/Users/jonatanlundin/Library/Application Support/Titanium/mobilesdk/osx/3.4.1.GA/android/kroll-apt.jar"/>
    <classpathentry kind="lib" path="lib/xwalk_core_library_java.jar"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

It should probably be updated to match the minsdk though :)

app2one commented 8 years ago

It should be problem of Eclilpse JDT and Android NDK since Titanium requires you to install them before you can create an Android Module. However I am struck on adding the NDK path, when I point to where I extracted, it says there to be path error.

2016-03-15 9 42 10
app2one commented 8 years ago

Here is how I fixed it.

I tried to follow this post with brew. But after installation, the SDK/NDK is not writable other than root, this makes Appcelerator Studio(AS) doesn't recognize the SDK/NDK path correctly. https://wiki.appcelerator.org/display/community/Managing+the+Android+SDK+and+NDK+on+OSX+using+Homebrew

So I gave up and install myself. I solved the 'ndk-gdb' missing complain by simply copying all files under

2016-03-15 3 46 29

to

2016-03-15 3 46 38

I have also added build.properties with titanium.platform=/Users/mtsui/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android android.platform=/Users/mtsui/android-sdk-macosx/platforms/android-23

Lastly, it has complained me missing architectures: armeabi So I have edited manifest to architectures: armeabi armeabi-v7a x86 It might not be necessary but has fixed the compile at least.

That's all and Good Luck.