Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Error Building Android Module

$
0
0

I'm trying to extend the android WebView so I can enable file dialogs. Here's my Proxy class.

/**
 * This file was auto-generated by the Titanium Module SDK helper for Android
 * Appcelerator Titanium Mobile
 * Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.
 * Licensed under the terms of the Apache Public License
 * Please see the LICENSE included with this distribution for details.
 *
 */
package com.liveon.android;
 
import org.appcelerator.kroll.KrollDict;
import org.appcelerator.kroll.KrollProxy;
import org.appcelerator.kroll.annotations.Kroll;
import org.appcelerator.titanium.*;
import org.appcelerator.titanium.util.Log;
import org.appcelerator.titanium.util.TiConfig;
import org.appcelerator.titanium.util.TiConvert;
import org.appcelerator.titanium.proxy.TiViewProxy;
import org.appcelerator.titanium.view.TiCompositeLayout;
import org.appcelerator.titanium.view.TiCompositeLayout.LayoutArrangement;
import org.appcelerator.titanium.view.TiUIView;
import ti.modules.titanium.ui.widget.webview.*;
import ti.modules.titanium.ui.WebViewProxy;
import android.webkit.*;
import android.net.*;
import android.content.Intent;
 
import android.app.*;
 
 
// This proxy can be created by calling LiveonAndroid.createExample({message: "hello world"})
@Kroll.proxy(creatableInModule=LiveonAndroidModule.class)
public class HTML5WebViewProxy extends WebViewProxy
{
    private static final String TAG = "HTML5WebViewProxy";
 
    public HTML5WebViewProxy() {
        super();
    }
 
    public HTML5WebViewProxy(TiContext context)
    {
        this();
    }
 
    @Override
    public TiUIView createView(final Activity activity)
    {
        TiUIWebView view = (TiUIWebView) super.createView(activity);
        WebView webView = view.getWebView();
         webView.setWebChromeClient(new WebChromeClient() {
 
             public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType)  
            {  
 
                Intent i = new Intent(Intent.ACTION_GET_CONTENT);  
                i.addCategory(Intent.CATEGORY_OPENABLE);  
                i.setType("image/*");  
                activity.startActivityForResult( Intent.createChooser( i, "File Chooser" ), 1 );  
            }
 
            // For Android < 3.0
            public void openFileChooser( ValueCallback<Uri> uploadMsg ) 
            {
                openFileChooser( uploadMsg, "" );
            }
 
 
        });
        return view;
    }
 
 
 
}
When I try to build I get this error.
ndk.build:
     [copy] Copying 11 files to /var/folders/r3/dhhfjncx3g9_bt_9qrwcctj80000gn/T/bgkittrell/liveon-android-generated
     [exec] Android NDK: WARNING:jni/Android.mk:com.liveon.android: non-system libraries in linker flags: -lkroll-v8    
     [exec] Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES    
     [exec] Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the    
     [exec] Android NDK:     current module    
     [exec] jni/Android.mk:35: warning: overriding commands for target `/private/var/folders/r3/dhhfjncx3g9_bt_9qrwcctj80000gn/T/bgkittrell/liveon-android-generated/KrollGeneratedBindings.cpp'
     [exec] jni/Android.mk:35: warning: ignoring old commands for target `/private/var/folders/r3/dhhfjncx3g9_bt_9qrwcctj80000gn/T/bgkittrell/liveon-android-generated/KrollGeneratedBindings.cpp'
     [exec] jni/Android.mk:38: warning: overriding commands for target `/private/var/folders/r3/dhhfjncx3g9_bt_9qrwcctj80000gn/T/bgkittrell/liveon-android-generated/BootstrapJS.cpp'
     [exec] jni/Android.mk:38: warning: ignoring old commands for target `/private/var/folders/r3/dhhfjncx3g9_bt_9qrwcctj80000gn/T/bgkittrell/liveon-android-generated/BootstrapJS.cpp'
     [exec] jni/Android.mk:35: warning: overriding commands for target `/private/var/folders/r3/dhhfjncx3g9_bt_9qrwcctj80000gn/T/bgkittrell/liveon-android-generated/KrollGeneratedBindings.cpp'
     [exec] jni/Android.mk:35: warning: ignoring old commands for target `/private/var/folders/r3/dhhfjncx3g9_bt_9qrwcctj80000gn/T/bgkittrell/liveon-android-generated/KrollGeneratedBindings.cpp'
     [exec] jni/Android.mk:38: warning: overriding commands for target `/private/var/folders/r3/dhhfjncx3g9_bt_9qrwcctj80000gn/T/bgkittrell/liveon-android-generated/BootstrapJS.cpp'
     [exec] jni/Android.mk:38: warning: ignoring old commands for target `/private/var/folders/r3/dhhfjncx3g9_bt_9qrwcctj80000gn/T/bgkittrell/liveon-android-generated/BootstrapJS.cpp'
     [exec] Android NDK: WARNING:jni/Android.mk:com.liveon.android: non-system libraries in linker flags: -lkroll-v8    
     [exec] Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES    
     [exec] Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the    
     [exec] Android NDK:     current module    
     [exec] Android NDK: WARNING:jni/Android.mk:com.liveon.android: non-system libraries in linker flags: -lkroll-v8    
     [exec] Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES    
     [exec] Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the    
     [exec] Android NDK:     current module    
     [exec] [armeabi] Compile++ thumb: com.liveon.android <= com.liveon.android.HTML5WebViewProxy.cpp
     [exec] jni/com.liveon.android.HTML5WebViewProxy.cpp: In static member function 'static void com::liveon::android::liveonandroid::HTML5WebViewProxy::dispose()':
     [exec] jni/com.liveon.android.HTML5WebViewProxy.cpp:62:2: error: 'WebViewProxy' has not been declared
     [exec] jni/com.liveon.android.HTML5WebViewProxy.cpp: In static member function 'static v8::Handle<v8::FunctionTemplate> com::liveon::android::liveonandroid::HTML5WebViewProxy::getProxyTemplate()':
     [exec] jni/com.liveon.android.HTML5WebViewProxy.cpp:80:3: error: 'WebViewProxy' has not been declared
     [exec] make: *** [/var/folders/r3/dhhfjncx3g9_bt_9qrwcctj80000gn/T//bgkittrell/liveon-android-generated/obj/local/armeabi/objs/com.liveon.android/com.liveon.android.HTML5WebViewProxy.o] Error 1
 
BUILD FAILED
/Users/bgkittrell/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.GA/module/android/build.xml:326: The following error occurred while executing this line:
/Users/bgkittrell/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.GA/module/android/build.xml:281: exec returned: 2
I don't know enough C++ to debug this. Any thoughts would be very helpful.

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>