java.lang.ClassNotFoundException:android.net.Network [英] java.lang.ClassNotFoundException: android.net.Network

查看:150
本文介绍了java.lang.ClassNotFoundException:android.net.Network的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这与 Payubiz付款网关sdk 整合. 但是,主要问题与构建项目有关.

This is little related to Payubiz payment gateway sdk integration. However, the main problem is related to building a project.

每当我们尝试在模拟器上运行应用程序时.我们得到以下 失败:

Whenever we try to run the application on emulator. We get the following failure:

  • 出了什么问题: 任务':app:transformClassesWithInstantRunForAppDebug'的执行失败. java.lang.ClassNotFoundException:android.net.Network
  • What went wrong: Execution failed for task ':app:transformClassesWithInstantRunForAppDebug'. java.lang.ClassNotFoundException: android.net.Network

但是,该应用程序可以在设备上运行时构建并平稳运行. 我们已经联系Payu团队解决此问题.但这是与android相关的问题,而不是付款网关.我觉得SO是更好的地方.

However, the application builds and run smoothly on running on a device. We have already contacted the Payu Team for the issue. But as it is an android related problem, not the payment gateway. I feel like SO is the better place.

仿真器详细信息:

  • 名称:Nexus_4_API_19 CPU/ABI:Google API Intel Atom(x86)
  • 目标:google_apis [Google API](API级别19)
  • runtime.network.speed:完整

解决方案: 以下是PayU小组的回复.他们已经确认自己没有使用任何课程,我也没有.但是过了一段时间,可能还会有其他依赖/清理项目.它也适用于仿真器.

SOLUTION: Below, is a reply from PayU team. They have confirmed that they were not using any class, neither do i. But after some time/ may be some other dependency/cleaning the project. It works for the emulator as well.

推荐答案

在API 21中添加了android.net.Network .您需要使用具有相同或更高API级别的仿真器来访问它.

The class android.net.Network is added in API 21. You need to use an emulator with the same or higher API level to access it.

这篇关于java.lang.ClassNotFoundException:android.net.Network的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆