正在寻找Guava的ProGuard配置,它将进行模糊处理和优化,因为网站上提供的默认配置不会.
不仅我不能让它导出我的apk,我一直得到:
Warning: com.google.common.collect.MinMaxPriorityQueue:
can't find referenced field 'int UNSET_EXPECTED_SIZE' in class
com.google.common.collect.MinMaxPriorityQueue$Builder
You should check if you need to specify additional program jars.
Run Code Online (Sandbox Code Playgroud) 我从首选项中单击"启用智能呼叫完成",但仍不建议这样做.还有什么需要做的吗?当我查看所有罐子时,似乎没有任何与任何罐子相关的推荐模型,它表示解决状态无人问津.我尝试使用一些不同的SDK,1.6和1.7.是因为我落后于代理吗?接收eclipse的更新工作,所以我不认为这是问题.
将目标api切换为“ Q”后,我无法在Android Q Emulator上安装APK。我得到错误:
无法完成会话:INSTALL_FAILED_INVALID_APK:无法提取本机库,res = -2
Android Studio(v3.3.2)建议我先卸载apk。我尝试卸载apk,但仍然收到相同的错误。如果我将目标api降级到28,则应用工作正常。
我环顾四周,试图清理我的构建文件夹,使缓存和重启无效,并设置 android.enableR8=false
但是,当我构建一个版本apk并尝试运行该应用程序时,我仍然无法解决这个问题.
2018-09-26 23:07:19.428 19200-19200/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: sic.nzb.app, PID: 19200
java.lang.VerifyError: Verifier rejected class com.google.firebase.FirebaseApp: void com.google.firebase.FirebaseApp.<clinit>() failed to verify: void com.google.firebase.FirebaseApp.<clinit>(): [0x33] register v1 has type Uninitialized Reference: java.lang.Object Allocation PC: 49 but expected Reference: java.lang.Object
void com.google.firebase.FirebaseApp.<init>(android.content.Context, java.lang.String, com.google.firebase.FirebaseOptions) failed to verify: void com.google.firebase.FirebaseApp.<init>(android.content.Context, java.lang.String, com.google.firebase.FirebaseOptions): [0x4B] 'this' arg must be initialized (declaration of 'com.google.firebase.FirebaseApp' appears in base.apk)
at com.google.firebase.FirebaseApp.a(SourceFile:274)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(SourceFile:37)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(SourceFile:31)
at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853) …Run Code Online (Sandbox Code Playgroud) 在android.support.v4.app.FragmentManager的文档中:
"静态库支持版本的框架的FragmentManager.用于编写在Android 3.0之前的平台上运行的应用程序.在Android 3.0或更高版本上运行时,仍然使用此实现;它不会尝试切换到框架的实现.请参阅用于类概述的框架SDK文档."
那么,我是否需要在运行时进行检查并使用相应的FragmentManager来运行应用程序的Android版本?ie如果在android 3.0+而不是getSupportFragmentManager()上调用getFragmentManager()
如何从Nexus 10仿真器捕获屏幕截图.我需要这些高分辨率的屏幕截图才能提交给Google Play商店.
当我尝试在Eclipse工具中使用屏幕捕获工具时,我得到"屏幕不可用".有人建议在Android Virutal设备管理器中取消选中"使用主机GPU",但如果我这样做,模拟器将无法启动.
我认为这可能是硬件限制?因为Nexus 10使用非常高的分辨率2560 x 1600.我可以捕获Nexus 7的截图.
不熟悉c ++,有人可以帮助我添加cmd到myStr数组并将其传递给main()函数,这是我到目前为止:
JNIEXPORT void JNICALL Java_my_package_JNIActivity_callCmdLine(
JNIEnv *env, jobject obj, jstring cmd)
{
const char *nativeString = env->GetStringUTFChars(cmd, 0);
env->ReleaseStringUTFChars(cmd, nativeString);
char * myStr [] = {"v", nativeString};
//int main(int argc, char *argv[])
main(1, myStr);
}
Run Code Online (Sandbox Code Playgroud) Build.VERSION.SDK_INT
Run Code Online (Sandbox Code Playgroud)
在Android Q模拟器上运行时,返回28而不是29。我有什么想念的吗?我正在尝试添加专门针对Android Q的逻辑,但我不知道如何正确确定此版本。
app.gradle文件包含
targetSdkVersion = 'Q'
compileSdkVersion = 'android-Q'
Run Code Online (Sandbox Code Playgroud) 我得到的比较方法违反了这个compareTo方法的一般合同异常,但是我无法追踪导致问题的原因.我试图以特定方式按其扩展名对文件进行排序.请注意,对于所有手机都没有这种情况,只有那些我无法访问的手机才会让它更难以测试.
public int compareTo(NzbFile another)
{
if (this.getFileName() != null && another.getFileName() != null)
{
if (this.getFileName().toLowerCase().endsWith(".nfo"))
return -1000;
else if (another.getFileName().toLowerCase().endsWith(".nfo"))
return 1000;
else if (this.getFileName().toLowerCase().endsWith(".sfv"))
return -999;
else if (another.getFileName().toLowerCase().endsWith(".sfv"))
return 1001;
else if (this.getFileName().toLowerCase().endsWith(".srr"))
return -998;
else if (another.getFileName().toLowerCase().endsWith(".srr"))
return 1002;
else if (this.getFileName().toLowerCase().endsWith(".nzb"))
return -997;
else if (another.getFileName().toLowerCase().endsWith(".nzb"))
return 1003;
else if (this.getFileName().toLowerCase().endsWith(".srt"))
return -996;
else if (another.getFileName().toLowerCase().endsWith(".srt"))
return 1004;
else
return this.getFileName().compareTo(another.getFileName());
}
else if (this.getFileName() != null && another.getFileName() == null)
{
return -995; …Run Code Online (Sandbox Code Playgroud) android ×7
java ×3
android-10.0 ×2
c++ ×1
eclipse ×1
guava ×1
nexus-10 ×1
proguard ×1
sdk ×1
target-sdk ×1