android - java.lang.ClassNotFoundException : android. 网络.网络

标签 android android-studio android-gradle-plugin payu

这与 Payubiz payment gateway sdk 关系不大一体化。 然而,主要问题与构建项目有关。

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

  • What went wrong: Execution failed for task ':app:transformClassesWithInstantRunForAppDebug'. java.lang.ClassNotFoundException: android.net.Network

但是,应用程序可以在设备上顺利构建和运行。 我们已就该问题联系 Payu 团队。但因为这是一个与安卓相关的问题,而不是支付网关的问题。我觉得 SO 是更好的地方。

模拟器详细信息:

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

解决方案: 以下是 PayU 团队的回复。他们已经确认他们没有使用任何类(class),我也没有。但一段时间后/可能是一些其他依赖/清理项目。它也适用于模拟器。

enter image description here

最佳答案

类(class)android.net.Network API 21中新增,需要使用同等或更高API级别的模拟器才能访问。

关于android - java.lang.ClassNotFoundException : android. 网络.网络,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39995922/

相关文章:

Android动态创建一个Button

android - ListView/ListAdapter 分页

android - Android Studio 1.0 RC 4构建错误

android - 如何通过在 Android-Studio 中编辑 build.gradle 将我的库放在 android.jar 前面

android - 如何在 Jenkins 中批准 Android SDK 工具的许可

android - 如何在小部件中收听 Intent.ACTION_CONFIGURATION_CHANGED 广播?

Android Studio Gradle 下载错误

android - Windows : how to keep a fixed port or connect automatically? 上的 adb over Wi-Fi (Android 11+)

android - Android Studio 2.3.3 的数据绑定(bind) + Gradle 相关问题

java - 有没有办法在 libGDX(Android 和 iOS 项目)中推送通知?