Espresso 和 Proguard 的 Java.lang.NoClassDefFoundError

2024-05-20

我对 Espresso 不太有经验,但我终于成功地运行了它。

我有一个应用程序需要通过 Proguard 缩小才能处于 56K 方法之下。

该应用程序以 3 秒的动画开始,因此我需要等到该动画结束才能继续。这就是我尝试用该方法做的事情waitFor(long delay)

我尝试将此方法作为独立类、内部类甚至项目类=相同的错误。

这是 Proguard 文件:

android {
    ...
    compileSdkVersion ANDROID_BUILD_SDK_VERSION
    buildToolsVersion ANDROID_BUILD_TOOLS_VERSION

    productFlavors {
        // Define separate dev and prod product flavors.
        dev {
            // dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
            // to pre-dex each module and produce an APK that can be tested on
            // Android Lollipop without time consuming dex merging processes.
            minSdkVersion 21
        }
        prod {
            // The actual minSdkVersion for the application.
            minSdkVersion ANDROID_BUILD_MIN_SDK_VERSION
        }
    }
    defaultConfig {
        applicationId "fr.xs.app.y"
        targetSdkVersion ANDROID_BUILD_TARGET_SDK_VERSION
        minSdkVersion ANDROID_BUILD_MIN_SDK_VERSION
        versionCode ANDROID_BUILD_VERSION_CODE
        versionName ANDROID_BUILD_APP_VERSION_NAME
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    // point sur le build de test
    testBuildType = "validation"

    buildTypes {
        release {
            debuggable false
            ext.enableCrashlytics = true
            renderscriptOptimLevel 3
            signingConfig android.signingConfigs.release
            zipAlignEnabled true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules-release.pro'
        }
        debug {
            debuggable true
            renderscriptOptimLevel 3
            applicationIdSuffix ".debug"
            versionNameSuffix "debug"
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-debug.pro', 'proguard-rules-dontobfuscate.pro'
        }

        validation.initWith(debug)

        validation {
            debuggable false
            renderscriptOptimLevel 3
            applicationIdSuffix ".validation"
            versionNameSuffix "validation"
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-debug.pro', 'proguard-rules-dontobfuscate.pro'
            testProguardFile('proguard-rules-test.pro')
        }
    }
...
}

混淆器配置

以下是 Proguard 文件(调试和测试) -保留类 fr.xs.app.y.** { *; } -不要混淆

我检查了这个类在mapping.txt(build/output/mapping/androidTest/dev)中,并且没有转换为另一个字符串。

这是测试类:

import android.app.Activity;
import android.support.test.espresso.Espresso;
import android.support.test.espresso.IdlingPolicies;
import android.support.test.espresso.IdlingResource;
import android.support.test.espresso.core.deps.guava.collect.Iterables;
import android.support.test.espresso.matcher.ViewMatchers;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.support.test.runner.lifecycle.ActivityLifecycleMonitorRegistry;
import android.support.test.runner.lifecycle.Stage;
import android.test.suitebuilder.annotation.LargeTest;

import com.squareup.spoon.Spoon;

import org.apache.commons.lang3.StringUtils;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

import java.util.concurrent.TimeUnit;

import fr.xs.app.y.Activity.SplashScreenActivity;

import static android.support.test.InstrumentationRegistry.getInstrumentation;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isCompletelyDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.CoreMatchers.allOf;

@RunWith(AndroidJUnit4.class)
@LargeTest
public class HelloWorldEspressoTest {

    @Rule
    public ActivityTestRule<SplashScreenActivity> mActivityRule = new ActivityTestRule<>(SplashScreenActivity.class);

    @Test
    public void seeHomeScreen() throws Throwable {

        // SpashScreen
        takeScreenShot("Chargement Application");
        onView(allOf(withText("Réveille l'amateur qui est en toi"),
                withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
                .check(matches(isCompletelyDisplayed()));
        takeScreenShot("Splash Screen en cours");
        waitForDelay(3000);
        takeScreenShot("Splash Screen à la fin");

        // HomeScree
        onView(allOf(withText("Nouvelle Dégustation"),
                withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
                .check(matches(isCompletelyDisplayed()));
        takeScreenShot("Home Screen");

        // Preference
        onView(withId(R.id.iv_seeParameters)).perform(click());
        onView(withId(R.id.content_frame_sign_unsign)).check(matches(isDisplayed()));
        takeScreenShot("Preferences Screen");


    Activity getCurrentActivity() throws Throwable {
        getInstrumentation().waitForIdleSync();
        final Activity[] activity = new Activity[1];

        getInstrumentation().runOnMainSync(new Runnable() {
            @Override
            public void run() {

                java.util.Collection activites = ActivityLifecycleMonitorRegistry.getInstance().getActivitiesInStage(Stage.RESUMED);
                activity[0] = (Activity) Iterables.getOnlyElement(activites);
            }
        });
        return activity[0];
    }

    private static void waitForDelay(long waitingTime) {

        // Make sure Espresso does not time out
        IdlingPolicies.setMasterPolicyTimeout(waitingTime * 2, TimeUnit.MILLISECONDS);
        IdlingPolicies.setIdlingResourceTimeout(waitingTime * 2, TimeUnit.MILLISECONDS);

        // Now we wait
        IdlingResource idlingResource = new ElapsedTimeIdlingResource(waitingTime);
        Espresso.registerIdlingResources(idlingResource);


        // Clean up
        Espresso.unregisterIdlingResources(idlingResource);
    }

    private void takeScreenShot(String title) throws Throwable {
        String string = StringUtils.stripAccents(title).replace(" ", "_");
        Spoon.screenshot(getCurrentActivity(), string);
    }

    static class ElapsedTimeIdlingResource implements IdlingResource {
        private final long startTime;
        private final long waitingTime;
        private ResourceCallback resourceCallback;

        public ElapsedTimeIdlingResource(long waitingTime) {
            this.startTime = System.currentTimeMillis();
            this.waitingTime = waitingTime;
        }

        @Override
        public String getName() {
            return ElapsedTimeIdlingResource.class.getName() + ":" + waitingTime;
        }

        @Override
        public boolean isIdleNow() {
            long elapsed = System.currentTimeMillis() - startTime;
            boolean idle = (elapsed >= waitingTime);
            if (idle) {
                resourceCallback.onTransitionToIdle();
            }
            return idle;
        }

        @Override
        public void registerIdleTransitionCallback(ResourceCallback resourceCallback) {
            this.resourceCallback = resourceCallback;
        }
    }
}

这是日志:

04-26 10:15:52.322 ? D/LifecycleMonitor:生命周期状态更改: fr.xs.app.y.Activity.SplashScreenActivity@6f8513d 于:暂停 04-26 10:15:52.322 ? D/LifecycleMonitor:生命周期状态 改变: fr.xs.app.y.Activity.SplashScreenActivity@6f8513d 于: 04-26 10:15:52.702 恢复? D/ActivityManager:bindService callerProcessName:fr.xs.app.y.validation, calleePkgName:com.google.android.gms,操作: com.google.android.gms.analytics.service.START 04-26 10:15:53.012 ? I/ActivityManager:显示 fr.xs.app.y.validation/fr.xs.app.y.Activity.SplashScreenActivity: +1s745ms(总计+36m45s584ms)04-26 10:15:53.762? I/时间线:时间线:Activity_windows_visible id:ActivityRecord{2b3eacb1 u0 fr.xs.app.y.validation/fr.xs.app.y.Activity.SplashScreenActivity t5952} 时间:259410459 04-26 10:15:54.592 ? I/art:拒绝重新初始化 以前不及格的班级 java.lang.Class 04-26 10:15:54.622 ?我/测试运行程序:失败: 请参阅HomeScreen(fr.xs.app.y.HelloWorldEspressoTest) 04-26 10:15:54.622 ? I/TestRunner:java.lang.NoClassDefFoundError: fr.xs.app.y.HelloWorldEspressoTest$ElapsedTimeIdlingResource 在 fr.xs.app.y.HelloWorldEspressoTest.waitForDelay(HelloWorldEspressoTest.java:166) 在 fr.xs.app.y.HelloWorldEspressoTest.seeHomeScreen(HelloWorldEspressoTest.java:56) 在 java.lang.reflect.Method.invoke(本机方法) 在 java.lang.reflect.Method.invoke(Method.java:372) 在 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) 在 org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) 在 org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) 在 org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) 在 android.support.test.internal.statement.UiThreadStatement.evaluate(UiThreadStatement.java:55) 在 android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:270) 在 org.junit.rules.RunRules.evaluate(RunRules.java:20) 在 org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) 在org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) 在org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) 在 org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) 在 org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) 在 org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) 在 org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) 在 org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) 在 org.junit.runners.ParentRunner.run(ParentRunner.java:363) 在 org.junit.runners.Suite.runChild(Suite.java:128) 在 org.junit.runners.Suite.runChild(Suite.java:27) 在 org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) 在 org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) 在 org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) 在 org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) 在 org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) 在 org.junit.runners.ParentRunner.run(ParentRunner.java:363) 在 org.junit.runner.JUnitCore.run(JUnitCore.java:137) 在 org.junit.runner.JUnitCore.run(JUnitCore.java:115) 在 android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59) 在 android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262) 在 android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1873) 04-26 10:15:54.622 ?我/测试运行者:完成: 请参阅HomeScreen(fr.xs.app.y.HelloWorldEspressoTest) 04-26 10:15:54.642 ? D/LifecycleMonitor:生命周期状态更改: fr.xs.app.y.Activity.SplashScreenActivity@6f8513d 于:暂停 04-26 10:15:54.672 ? I/TestRunner:开始: 初始化错误(fr.xs.app.y.suites.system.LogSupportUser) 04-26 10:15:54.732 ?我/测试运行程序:失败: 初始化错误(fr.xs.app.y.suites.system.LogSupportUser) 04-26 10:15:54.732 ?我/测试运行者:完成: 初始化错误(fr.xs.app.y.suites.system.LogSupportUser) 04-26 10:15:55.692 ? D/KidsModeInstallReceiver:onReceive 意图数据 = 包:fr.xs.app.y.validation.test 04-26 10:15:56.752 ? E/SPPClientService:[PackageInfoChangeReceiver] [handlePkgRemovedEvent] 包名称: fr.xs.app.y.validation.test,真,假 04-26 10:15:56.932? D/LifecycleMonitor:生命周期状态更改: fr.xs.app.y.Activity.SplashScreenActivity@6f8513d 于:停止 04-26 10:15:56.932 ? D/LifecycleMonitor:生命周期状态 改变: fr.xs.app.y.Activity.SplashScreenActivity@6f8513d 于: 毁坏 04-26 10:15:57.302 ? I/ActivityManager:强制停止 fr.xs.app.y.validation appid=10582 用户=0: 完成安装

到目前为止还没有办法运行它!


None

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Espresso 和 Proguard 的 Java.lang.NoClassDefFoundError 的相关文章

  • 斯坦福 NLP - 处理文件列表时 OpenIE 内存不足

    我正在尝试使用斯坦福 CoreNLP 中的 OpenIE 工具从多个文件中提取信息 当多个文件 而不是一个 传递到输入时 它会给出内存不足错误 All files have been queued awaiting termination
  • 你的CPU不支持NX

    我刚刚下载了 android studio 但是我遇到了一个问题 当我运行它时 它说你的 cpu 不支持 NX 我应该怎么办 NX 或实际上是 NX 处理器位 是处理器的一项功能 有助于保护您的 PC 免受恶意软件的攻击 当此功能未启用并且
  • 十进制到八进制的转换[重复]

    这个问题在这里已经有答案了 可能的重复 十进制转换错误 https stackoverflow com questions 13142977 decimal conversion error 我正在为一个类编写一个程序 并且在计算如何将八进
  • 在 android DatePickerDialog 中将语言设置为法语

    有什么办法可以让日期显示在DatePickerDialog用法语 我已经搜索过这个但没有找到结果 这是我的代码 Calendar c Calendar getInstance picker new DatePickerDialog Paym
  • 如何将 pfx 文件转换为 jks,然后通过使用 wsdl 生成的类来使用它来签署传出的肥皂请求

    我正在寻找一个代码示例 该示例演示如何使用 PFX 证书通过 SSL 访问安全 Web 服务 我有证书及其密码 我首先使用下面提到的命令创建一个 KeyStore 实例 keytool importkeystore destkeystore
  • getResourceAsStream() 可以找到 jar 文件之外的文件吗?

    我正在开发一个应用程序 该应用程序使用一个加载配置文件的库 InputStream in getClass getResourceAsStream resource 然后我的应用程序打包在一个 jar文件 如果resource是在里面 ja
  • 加密 JBoss 配置中的敏感信息

    JBoss 中的标准数据源配置要求数据库用户的用户名和密码位于 xxx ds xml 文件中 如果我将数据源定义为 c3p0 mbean 我会遇到同样的问题 是否有标准方法来加密用户和密码 保存密钥的好地方是什么 这当然也与 tomcat
  • 在 Mac 上正确运行基于 SWT 的跨平台 jar

    我一直致力于一个基于 SWT 的项目 该项目旨在部署为 Java Web Start 从而可以在多个平台上使用 到目前为止 我已经成功解决了由于 SWT 依赖的系统特定库而出现的导出问题 请参阅相关thread https stackove
  • 仅将 char[] 的一部分复制到 String 中

    我有一个数组 char ch 我的问题如下 如何将 ch 2 到 ch 7 的值合并到字符串中 我想在不循环 char 数组的情况下实现这一点 有什么建议么 感谢您花时间回答我的问题 Use new String value offset
  • 我的设备突然没有显示在“Android 设备选择器”中

    我正在使用我的三星 Galaxy3 设备来测试过去两个月的应用程序 它运行良好 但从今天早上开始 当我将设备连接到系统时 它突然没有显示在 Android 设备选择器 窗口中 我检查过 USB 调试模式仅在我的设备中处于选中状态 谁能猜出问
  • Android 中麦克风的后台访问

    是否可以通过 Android 手机上的后台应用程序 服务 持续监控麦克风 我想做的一些想法 不断聆听背景中的声音信号 收到 有趣的 音频信号后 执行一些网络操作 如果前台应用程序需要的话 后台应用程序必须能够智能地放弃对麦克风的访问 除非可
  • Java列表的线程安全

    我有一个列表 它将在线程安全上下文或非线程安全上下文中使用 究竟会是哪一个 无法提前确定 在这种特殊情况下 每当列表进入非线程安全上下文时 我都会使用它来包装它 Collections synchronizedList 但如果不进入非线程安
  • 玩!框架:运行“h2-browser”可以运行,但网页不可用

    当我运行命令时activator h2 browser它会使用以下 url 打开浏览器 192 168 1 17 8082 但我得到 使用 Chrome 此网页无法使用 奇怪的是它以前确实有效 从那时起我唯一改变的是JAVA OPTS以启用
  • Android 套接字和 asynctask

    我即将开始制作一个应该充当 tcp 聊天客户端的应用程序 我一直在阅读和阅读 我得出的结论是最好 如果不需要 将我的套接字和异步任务中的阅读器 问题是我不确定从哪里开始 因为我是 Android 新手 这至少对我来说是一项艰巨的任务 但据我
  • 声明的包“”与预期的包不匹配

    我可以编译并运行我的代码 但 VSCode 中始终显示错误 早些时候有一个弹出窗口 我不记得是什么了 我点击了 全局应用 从那以后一直是这样 Output is there but so is the error The declared
  • 如何确定对手机号码的呼叫是本地呼叫还是 STD 或 ISD

    我正在为 Android 开发某种应用程序 但不知道如何获取被叫号码是本地或 STD 的号码的数据 即手机号码检查器等应用程序从哪里获取数据 注意 我说的是手机号码 而不是固定电话 固定电话号码 你得到的数字是字符串类型 因此 您可以获取号
  • 如何将 google+ 登录集成到我的 Android 应用程序中?

    大家好 实际上我需要通过我的应用程序从 google 登录人们 现在我阅读了 google 上的文档 其中指出 要允许用户登录 请将 Google Sign In 集成到您的应用中 初始化 GoogleApiClient 对象时 请求 PL
  • java.lang.IllegalStateException:驱动程序可执行文件的路径必须由 webdriver.chrome.driver 系统属性设置 - Similiar 不回答

    尝试学习 Selenium 我打开了类似的问题 但似乎没有任何帮助 我的代码 package seleniumPractice import org openqa selenium WebDriver import org openqa s
  • 按日期对 RecyclerView 进行排序

    我正在尝试按日期对 RecyclerView 进行排序 但我尝试了太多的事情 我不知道现在该尝试什么 问题就出在这条线上适配器 notifyDataSetChanged 因为如果我不放 不会显示错误 但也不会更新 recyclerview
  • Spring Boot @ConfigurationProperties 不从环境中检索属性

    我正在使用 Spring Boot 1 2 1 并尝试创建一个 ConfigurationProperties带有验证的bean 如下所示 package com sampleapp import java net URL import j

随机推荐

  • .Net Web API 未找到与请求 URI 匹配的 HTTP 资源

    我正在开发 Net Web API 它在调试和本地主机 IIS 上都运行良好 但是当我将其发布到服务器时 它开始给出以下错误 Message 未找到与请求 URI 匹配的 HTTP 资源 在服务器上 我们在该 API 的默认站点下有应用程序
  • App_Data 文件夹内的数据库与连接到 SQL Server 的数据库有什么区别?

    我是 NET 新手 在开始学习 ASP NET MVC2 框架时 我发现您可以在 App Data 文件夹中创建一个 mdf 文件并连接到它 或者您可以连接到 SQL Server 这些与数据库交互的方法有什么区别 一种相对于另一种的优点
  • 从多个类访问串行端口

    我正在尝试使用串行端口在 arduino 和 C 程序之间进行通信 我对 C 编程有点陌生 该程序有多种用户控制形式 每一个都需要访问串口来发送数据 我需要做的就是从每个类的主窗体中写入串行端口 我了解如何设置和写入串行端口 这是我的 Fo
  • Swift 中通过不同类调用委托方法

    我正在获取 JSON 菜单 一旦 JSON 返回 我想运行 menuReady 来更新表的内容在 SomeTableViewController 类中 但下面的代码似乎不起作用 AIM Run 菜单就绪 JSON 返回后更新内容 PROBL
  • Mongoose 和 Promise:如何获取查询结果数组?

    使用猫鼬从数据库和 Q 中查询结果以获取承诺 但发现很难只获取可用用户列表 目前我有一些这样的东西 var checkForPerson function person people mongoose model Person Person
  • 如何在没有 user_impersonation OAuth2Permission 的情况下创建新的 Azure 应用程序注册?

    我想知道 Azure 专家中是否有人可以澄清New AzureADApplication https learn microsoft com en us powershell module azuread new azureadapplic
  • Android - 如何更改 TimePicker 中的文本颜色?

    我正在使用 TimePicker 到 LinearLayout 中 背景颜色 黑色 但是 我看不到 TimePicker 中的数字 并且我需要在布局中将背景颜色设置为黑色 如何更改 TimePicker 中的 textColor 我已经尝试
  • gitlab-ci 的缓存虚拟环境

    我使用 Gitlab CI 脚本缓存了 Pip 包 所以这不是问题 现在我还想赶上Conda虚拟环境 因为它减少了设置环境的时间 我缓存了一个虚拟环境 不幸的是 最后需要很长时间才能缓存所有 venv 文件 我尝试仅缓存 CI PROJEC
  • ADO.NET SQLServer:如何防止关闭的连接持有S-DB锁?

    i Dispose http msdn microsoft com en us library system data sqlclient sqlconnection close aspx一个 SqlConnection 对象 但是当然它并
  • R:改变堆积条形图的颜色

    library ggplot2 df2 lt data frame supp rep c VC OJ each 3 dose rep c D0 5 D1 D2 2 len c 6 8 15 33 4 2 10 29 5 head df2 g
  • 如何在 python 中没有 csv.reader 迭代器的情况下解析单行 csv 字符串?

    我有一个 CSV 文件 需要重新排列和重新编码 我想跑 line line decode windows 1250 encode utf 8 在由 CSV 读取器解析和分割之前的每一行 或者我想自己迭代行 运行重新编码 并仅使用单行解析表单
  • 使用 leftOuterJoin,不需要 .DefaultIfEmpty()

    的文档leftOuterJoin MSDN 上的查询表达式 http msdn microsoft com en us library hh225374 aspx通过样本反复暗示 当使用leftOuterJoin on into 你仍然必须
  • 暂停下载线程

    我正在用 C 编写一个非常简单的批量下载程序 该程序读取要下载的 URL 的 txt 文件 我已经设置了一个全局线程和委托来更新 GUI 按下 开始 按钮即可创建并启动该线程 我想要做的是有一个 暂停 按钮 使我能够暂停下载 直到点击 恢复
  • Flutter:如何在flutter中指定设备id?

    如何在flutter run中选择设备id 请使用 d 标志指定设备 或使用 d all 对所有设备进行操作 iPhone 6 54XXXXXX35130ebefd38f ios iOS 10 3 3 iPhone 7 Plus BA8CX
  • 如何在 Ruby 中将 DateTime.now 转换为 UTC?

    如果我有d DateTime now 如何将 d 转换为 UTC 带有适当的日期 DateTime now new offset 0 将在标准 Ruby 中工作 即没有 ActiveSupport
  • 访问者和模板化虚拟方法

    在一个典型的实现中Visitor模式 该类必须考虑基类的所有变体 后代 在许多情况下 访问者中的相同方法内容应用于不同的方法 在这种情况下 模板化的虚拟方法是理想的选择 但目前这是不允许的 那么 模板化方法可以用来解析父类的虚方法吗 鉴于
  • 如何从 C# 控制器重定向到外部 url

    我使用 C 控制器作为网络服务 在其中我想将用户重定向到外部网址 我该怎么做 Tried System Web HttpContext Current Response Redirect 但没有成功 使用控制器的重定向 http msdn
  • 使用 Kivy 应用程序进行 Tesseract OCR

    是否可以将 Tesseract OCR 或 Tess Two 与 Kivy 应用程序集成 我正在寻找使用 Kivy 框架创建一个用于基于 OCR 的文本识别的 Android 应用程序 我在我的 PC 上使用 Tesseract API 一
  • 检查算术运算中的溢出情况[重复]

    这个问题在这里已经有答案了 可能的重复 检测 C C 中整数溢出的最佳方法 https stackoverflow com questions 199333 best way to detect integer overflow in c
  • Espresso 和 Proguard 的 Java.lang.NoClassDefFoundError

    我对 Espresso 不太有经验 但我终于成功地运行了它 我有一个应用程序需要通过 Proguard 缩小才能处于 56K 方法之下 该应用程序以 3 秒的动画开始 因此我需要等到该动画结束才能继续 这就是我尝试用该方法做的事情waitF