我正在尝试编译并运行为旧 Android 版本编写的演示应用程序。
我已更新所有文件以使用新的 androidx 库。这包括 gradle.build 清单和布局文件。它编译正确,但在主要活动上崩溃setContentView(R.layout.activity_main);
通过查看堆栈跟踪,我可以推断出它与 layout.xml 文件相关,因为应用程序在第一次设置时崩溃。但是在将 FloatingActionButton 从旧的 deisgn 库迁移到新的 deisgn 库后,我找不到布局文件的任何问题。
有任何想法吗?
堆:
I/zygote: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener;
at void androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, androidx.core.view.OnApplyWindowInsetsListener) (ViewCompat.java:2423)
at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:750)
at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:630)
at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:529)
at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:161)
at void com.example.android.emojify.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:75)
at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6975)
at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1213)
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2770)
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2892)
I/zygote: at void …
Run Code Online (Sandbox Code Playgroud) 我有一个常量类,我试图在运行时使用public static final String设置批号常量.我的IDE给了我一个警告"静态方法声明最终",我想知道我做错了什么.
file从Spring yml文件中获取值.
私有String文件; (XXX-12345.txt)
public String getBatchNo() {
return parseBatchNo(file);
}
public static final String parseBatchNo(String file) {
return file.substring((file.lastIndexOf("-") + 1), (file.length() - 4));
}
Run Code Online (Sandbox Code Playgroud) 嗨,我是 Web 服务的新手。这是我的疑问
1)如果我托管我的网站,那么它们应该是一个网络服务器,它应该让我的网站保持在我们正在调用的服务器中。
2)如果我想在我的本地系统中运行 PHP 程序,我应该使用本地服务器(XAMPP),这也是我们调用的服务器。
我的疑问是例如在本地系统中我已经下载了 Xampp 并且我正在运行我的服务器端程序..但是上传到服务器后它是如何工作的
还有AWS,Proxy是哪个服务器???
所有的服务器都很混乱