在 Activity 的 mainThread 中使用了我的图像处理程序和 Exo 播放器(用于播放音乐)。OS-9 (Nokia) 设备中的螺母无法正常工作 imageHandler -> 连接到 Workhandler。代码下方:WorkHandler
public class WorkHandler extends android.os.HandlerThread {
private Handler workHandler = null;
private volatile List<WorkMessageProxy> messageProxyList;
public WorkHandler() {
super("WorkHandler", Process.THREAD_PRIORITY_BACKGROUND);
start();
workHandler = new Handler(getLooper()) {
@Override
public void handleMessage(Message msg) {
if (messageProxyList != null) {
for (WorkMessageProxy workMessageProxy : messageProxyList) {
Log.i("workHandler", "handleMessage: Message: " + msg.toString());
workMessageProxy.handleMessage(msg);
}
}
}
};
}
public void post(Runnable run) {
workHandler.post(run);
}
public void postAtFrontOfQueue(Runnable runnable) …Run Code Online (Sandbox Code Playgroud) 在将Android Studio 3.3更新到3.4之后,它会出现错误。出现了一个错误,即AAPT2,这为我提供了一个建议我喜欢这样的错误:
此构建中使用了不推荐使用的Gradle功能,使其与Gradle 6.0不兼容。使用“ --warning-mode all”来显示各个弃用警告。看到
gradle.properties
org.gradle.warning.mode=all
Run Code Online (Sandbox Code Playgroud)
但仍然无法正常工作。
错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeIntroMakerDebugResources'.
> 8 exceptions were raised by workers:
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #2: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows …Run Code Online (Sandbox Code Playgroud) 我已经在Google Play商店中上传了我的应用程序,并且Google发出了“ Android安全性”警告。
在Application中,我们下载了Zip文件夹并将此Zip文件夹保存在内部存储器中,然后将该文件夹解压缩到设备的内部存储器中。
这是解压缩文件夹代码:
public static void doUnzip(String inputZipFile, String
destinationDirectory, ZipProgressListener zipProgressListener) throws
IOException, RuntimeException {
Log.e(TAG, "doUnzip:inputZipFile: " + inputZipFile);
Log.e(TAG, "doUnzip:destinationDirectory: " + destinationDirectory);
int BUFFER = 6 * 1024;
List zipFiles = new ArrayList();
File sourceZipFile = FileUtils.createValidFile(inputZipFile);
File unzipDestinationDirectory =
FileUtils.createValidFile(destinationDirectory);
unzipDestinationDirectory.mkdir();
String newPath = unzipDestinationDirectory.getAbsolutePath() +
File.separator +
FileUtils.getFileNameWithoutExtension(sourceZipFile.getName());
new File(newPath).mkdir();
ZipFile zipFile;
// Open Zip file for reading
zipFile = new ZipFile(sourceZipFile, ZipFile.OPEN_READ);
int entries = zipFile.size();
int total = 0;
Log.e(TAG, …Run Code Online (Sandbox Code Playgroud)