Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

引入libv2ray.aar后项目编译仍然失败,希望有空时帮忙看看~十分感谢~ #88

Closed
AlienwareHe opened this issue Aug 31, 2019 · 8 comments

Comments

@AlienwareHe
Copy link

在自己编译生成libv2ray.aar后,编译项目时发现编译失败。

编译错误原因

  1. Unresolved reference: InappBuyActivity
  2. V2RayVpnService.kt: No value passed for parameter 'p1'
  3. V2RayVpnService.kt: Unresolved reference: packageName
  4. V2RayVpnService.kt: Unresolved reference: enableLocalDNS
  5. 3V2RayVpnService.kt: Unresolved reference: forwardIpv6
  6. ....

拉取的master分支的代码,感觉代码是不是缺少什么。

详细错误日志:

e: /Users/alienhe/code/public/v2rayNG/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayVpnService.kt: (59, 68): No value passed for parameter 'p1'
e: /Users/alienhe/code/public/v2rayNG/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayVpnService.kt: (106, 20): Unresolved reference: packageName
e: /Users/alienhe/code/public/v2rayNG/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayVpnService.kt: (238, 24): Unresolved reference: enableLocalDNS
e: /Users/alienhe/code/public/v2rayNG/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayVpnService.kt: (239, 24): Unresolved reference: forwardIpv6
e: /Users/alienhe/code/public/v2rayNG/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayVpnService.kt: (436, 9): 'sendFd' overrides nothing
e: /Users/alienhe/code/public/v2rayNG/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/BaseDrawerActivity.kt: (16, 22): Unresolved reference: InappBuyActivity
e: /Users/alienhe/code/public/v2rayNG/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/BaseDrawerActivity.kt: (66, 39): Unresolved reference: InappBuyActivity
e: /Users/alienhe/code/public/v2rayNG/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainActivity.kt: (30, 22): Unresolved reference: InappBuyActivity
e: /Users/alienhe/code/public/v2rayNG/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/MainActivity.kt: (578, 31): Unresolved reference: InappBuyActivity
e: /Users/alienhe/code/public/v2rayNG/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SettingsActivity.kt: (12, 22): Unresolved reference: InappBuyActivity

@phoenixxie0
Copy link

@AlienwareHe 你需要手动在kt文件里删掉import InappBuyActivity 在的字段,一个模块是作者编译的时候加入捐赠功能的地方,同步github的时候已经去掉相关文件,但是没有在一些kt文件里删除相关的行,你需要手动删掉它们。就能编译过了。

@AlienwareHe
Copy link
Author

@xseven007 非常感谢~但是V2RayVpnService.kt中private val v2rayPoint = Libv2ray.newV2RayPoint(V2RayCallback())这行代码还是存在报错的情况,报错内容是方法参数匹配不上,我改成private val v2rayPoint = Libv2ray.newV2RayPoint()才能编译通过,但不确定对功能是否会有影响~

@2dust
Copy link
Owner

2dust commented Sep 2, 2019

重新下载全部源码
已经把aar上传,并去除报错

@2dust 2dust closed this as completed Sep 2, 2019
@AlienwareHe
Copy link
Author

@2dust 不好意思~没有找到aar🤣是在https://github.com/2dust/AndroidLibV2rayLite里吗~重新编译生成了libv2ray.aar还是会报Libv2ray.newV2RayPoint(V2RayCallback()):too many arguments for public open fun newV2RayPoint~

@2dust
Copy link
Owner

2dust commented Sep 2, 2019

https://github.com/2dust/AndroidLibV2rayLite 已经被我们魔改了,当前不能匹配了
所以我上传了aar到libs ,你直接下载这个源码,就能通过了

@AlienwareHe
Copy link
Author

@2dust 好的~已经成功,十分感谢,感受到了开源的魅力

@AlienwareHe
Copy link
Author

@2dust 作者你好~ 我在使用v2ray作为客户端连接socks代理时遇到了一点问题,一直无法代理成功,国内的网也无法连接,我的疑惑是 服务端必须也要使用v2ray搭建吗还是任意socks服务器都行。

这是我的配置文件:
{ "dns": { "servers": [ "1.1.1.1" ] }, "inbounds": [ { "port": 10808, "protocol": "socks", "settings": { "auth": "noauth", "udp": true, "userLevel": 8 }, "sniffing": { "destOverride": [ "http", "tls" ], "enabled": true }, "tag": "socks" }, { "port": 10809, "protocol": "http", "settings": { "userLevel": 8 }, "tag": "http" } ], "log": { "loglevel": "warning" }, "outbounds": [ { "mux": { "enabled": false }, "protocol": "socks", "settings": { "servers": [ { "address": "proxy.xxx.xxx.com", "level": 8, "method": "chacha20", "ota": false, "password": "123456", "port": 10080 } ] }, "streamSettings": { "network": "tcp" }, "tag": "proxy" }, { "protocol": "freedom", "settings": {}, "tag": "direct" }, { "protocol": "blackhole", "settings": { "response": { "type": "http" } }, "tag": "block" } ], "policy": { "levels": { "8": { "connIdle": 300, "downlinkOnly": 1, "handshake": 4, "uplinkOnly": 1 } }, "system": { "statsInboundUplink": true, "statsInboundDownlink": true } }, "routing": { "domainStrategy": "AsIs", "rules": [] }, "stats": {} }

@phoenixxie0
Copy link

@2dust 使用最新的commit编译能成功,但是依然出现no correct JVM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants