Android J2Ojbc本机编译-缺少guava头

Android J2Ojbc本机编译-缺少guava头,android,j2objc,j2objc-gradle,Android,J2objc,J2objc Gradle,我们正在将一个iOS应用程序移植到Android上,并正在探索J2objc和protobuf。到目前为止,我们正在解决这些问题(我们是Android新手,其中许多问题是由于学习曲线) 这个问题看起来像是j2objc-1.0-2.2最新版本上的一个bug。翻译后的objective c实现类中的#include没有更改为驼峰情况。有人见过这种行为吗?这是一个bug还是我们缺少的设置 谢谢你的帮助 以下是编译错误: GcatMobile/shared/build/j2objcSrcGenMain/c

我们正在将一个iOS应用程序移植到Android上,并正在探索J2objc和protobuf。到目前为止,我们正在解决这些问题(我们是Android新手,其中许多问题是由于学习曲线)

这个问题看起来像是j2objc-1.0-2.2最新版本上的一个bug。翻译后的objective c实现类中的#include没有更改为驼峰情况。有人见过这种行为吗?这是一个bug还是我们缺少的设置

谢谢你的帮助

以下是编译错误:

GcatMobile/shared/build/j2objcSrcGenMain/com/gcatconsult/shared/remote/NetworkBase.m:14:10: fatal error:
'com/google/common/io/BaseEncoding.h' file not found

#include "com/google/common/io/BaseEncoding.h"
以下是我翻译的实现类NetworkBase.m中的#includes:

#include "IOSClass.h"
#include "IOSPrimitiveArray.h"
#include "J2ObjC_source.h"
#include "com/gcatconsult/shared/messages/nano/Resp.h"
#include "com/gcatconsult/shared/remote/NetworkBase.h"
#include "com/google/common/io/BaseEncoding.h"
#include "com/google/protobuf/nano/MessageNano.h"
#include "java/io/BufferedInputStream.h"
#include "java/io/ByteArrayOutputStream.h"
#include "java/io/InputStream.h"
#include "java/io/OutputStream.h"
#include "java/io/PrintStream.h"
#include "java/lang/Exception.h"
#include "java/lang/Integer.h"
#include "java/lang/System.h"
#include "java/net/HttpURLConnection.h"
#include "java/net/MalformedURLException.h"
#include "java/net/URL.h"
#include "java/net/URLConnection.h"
#include "java/util/zip/GZIPOutputStream.h"
以下是build.gradle文件:

plugins {
    id 'java'
    id "com.github.j2objccontrib.j2objcgradle" version "0.6.0-alpha"
    id "com.google.protobuf" version "0.7.5"
}

sourceSets {
    main.java.srcDirs += 'src/main/javanano'
}

dependencies {
    // Any libraries you depend on, like Guava or JUnit
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.google.guava:guava:19.0'
    compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-5'
    testCompile 'junit:junit:4.12'
}

protobuf {
    protoc {
        artifact = "com.google.protobuf:protoc:3.0.0-beta-2"
    }

    generateProtoTasks {
        all().each { task ->
            task.builtins {
                remove java
                javanano {
                    option 'java_multiple_files=true'
                    option 'ignore_services=true'
                }
            }
        }
    }
    generatedFilesBaseDir = "$projectDir/src"
}


// Plugin settings; put these at the bottom of the file.
j2objcConfig {
    // Sets up libraries you depend on
    autoConfigureDeps true
    skipJ2objcVerification true
    translateClasspaths = ["../../SoftwareDev/NgCalDev/External/j2objc-1.0-2.2/lib/guava-19.0.jar"]
    translateArgs '--prefixes', 'src/main/resources/prefixes.properties'
//    testMinExpectedTests 0

    // Omit these two lines if you don't configure your Xcode project with CocoaPods
//    xcodeProjectDir '../../NGCalDev/AuthTouchId'  //  suggested directory name
//    xcodeTargetsIos 'IOS-APP', 'IOS-APPTests'  // replace with your iOS targets

    finalConfigure()          // Must be last call to configuration
}

我们正在使用J2objc 1.0-2.2,最新版本的Xcode:Version7.3(7D175),以及OS X El Capitan version 10.11.4,Guava正在将其API升级到Java 8,因此开发人员需要一种方法来包含它的不同版本。因此,Guava includes被移动到/include/Guava/,因此您需要将该路径添加到标题搜索路径中。

谢谢。在插件的j2objcConfig上找到以下标志:extraObjcCompilerArgs+=“-I/Users/developer/SoftwareDev/External/j2objc-1.0-2.2/include/guava”。谢谢你的帮助。现在我可以开始测试Xcode端了。