草庐IT

init_printing

全部标签

java - Android logcat错误: ZipFileCache: init failed when open zip file - device specific?

无法从LogCat获取任何有用的日志。我的应用程序运行良好(两台设备),所有日志在我的Nexus设备上也很好。但是使用我的手机(华为P8Lite,未Root,Android5)我收到此错误消息:11-1211:21:07.740:E/ZipFileCache(7584):initfailedwhenopenzipfile.我尝试将其恢复为出厂设置,但没有成功。我的应用根本没有使用ZIP功能,只访问内部存储。我在互联网上找到了几篇关于此的帖子,但始终没有解决方案。还测试了Eclipse和AndroidStudio,结果相同。 最佳答案

android - 从 Android Studio logcat 中的 System.out.print 中删除时间、日期和包名称

我想删除以下类型的文字"06-1114:36:59.8143951-4564/example.myapplicationI/System.out﹕"来self应用程序中的system.out.prints。我怎样才能做到这一点?我正在使用安卓工作室 最佳答案 AndroidStudio2.2不确定是哪个版本提供的,但2.2有它...我自己发现了这个。好开心。 关于android-从AndroidStudiologcat中的System.out.print中删除时间、日期和包名称,我们在S

android - 在 Android 中使用 Google Cloud Print API

我正在开发一个需要打印到打印机的android应用程序。我决定使用谷歌云打印,因为它看起来很容易设置。最初,我按照找到的步骤here用于集成到Android中。这有效,因为它将打印到我想要​​的打印机。但是,这个过程对用户来说有点复杂。就我而言,过程如下:用户选择了我在某些信息旁边显示的打印按钮。会显示一个对话框,其中包含将要打印的内容的预览。ActionBar中有一个按钮,上面写着“打印”。这开始了这个过程。将显示一个新的Activity,其中列出了连接到该用户Google帐户的打印机。用户必须选择一个。显示一个新页面,提供打印作业的说明。用户必须选择右上角的“打印”。打印作业开始,

android - repo init 和 repo sync 实际上是做什么的?

我在AndroidEnthusiasts上发布了这个问题,但认为这是错误的提问地点,所以我从那里删除了它,并在此处“再次”提问。这是一个菜鸟问题,如果是,请原谅我,但我只是想清楚地理解基本概念。阅读repo帮助和Google的repo命令引用页面并没有真正的启发。我从Google的引用页面中了解了一些内容,但我仍然需要更多说明。按照有关如何下载android源代码的说明,我在Ubuntushell上执行了这两个命令:(我已经处理了环境的所有先决条件。)~/android4.2.2$repoinit-uhttps://android.googlesource.com/platform/m

android - 由: java. lang.NoSuchMethodException : <init> [class android. content.Context,接口(interface)android.util.AttributeSet引起]

我在运行应用程序时收到此错误。错误:Causedby:java.lang.NoSuchMethodException:[classandroid.content.Context,interfaceandroid.util.AttributeSet]atjava.lang.Class.getConstructorOrMethod(Class.java:472)atjava.lang.Class.getConstructor(Class.java:446)atandroid.view.LayoutInflater.createView(LayoutInflater.java:574)ata

android - Gradle 失败并显示 "Ambiguous method overloading for method java.io.File#<init>"

当gradlebuild我的项目时,我收到了这个错误:FAILURE:Buildfailedwithanexception.Where:Buildfile'App/build.gradle'line:45Whatwentwrong:Aproblemoccurredevaluatingproject':App'.Ambiguousmethodoverloadingformethodjava.io.File#.Cannotresolvewhichmethodtoinvokefor[null,classjava.lang.String]duetooverlappingprototypesbe

android - 对 init.rc 进行持久更改

我想更改androidpad的init.rc文件。但是我改完重启系统后,原来的init.rc又回来了。如何在不重建系统的情况下持久地更改init.rc(因为我没有系统的源代码)?或者有什么办法可以解决? 最佳答案 在主机PC(Linux)中使用以下命令解压uramdiskmkdir/tmp/initrccd/tmp/initrdsudomount/dev/sdb1/mntsdb1是uramdisk/uInitrd所在的分区。ddbs=1skip=64if=/mnt/uInitrdof=initrd.gzgunzipinitrd.gz

c++ - GCC 无法使用 init-capture 捕获 'this' 指向模板类型的指针

模板类可以在lambda中捕获自己的this指针:templateclassFoo{public:voidfoo(void){}autogetCallableFoo(void){return[this](){this->foo();};}};可以使用以下代码测试这个和所有其他Foo示例:intmain(){Foof;autocallable=f.getCallableFoo();callable();}但是,如果改为使用init-capture,则这不再适用于GCC:autogetCallableFoo(void){return[ptr=this](){ptr->foo();};}错误

c++ - pretty-print 类型和类模板及其所有模板参数

自从typeid(T).name()不会返回人类可以理解的类型名称,如果我们想将模板参数的名称打印到某个类模板,它对我们没有多大帮助,尤其是在我们调试时。我们经常想在调试时写这个:print(cout);//dumpthenamesofalltypestostdout!所以我正在编写pretty-print实用程序,它给了我类模板的名称。嗯,通过一些示例用法更容易理解:print(cout);//printsintprint(cout);//printsint,double,charprint(cout);//printsstd::basic_stringprint(cout);//p

c++ - 怎么解析: constructing unnamed temporary with braced init list

我最近yetagainencountered符号(constint[10]){10,9,8,7,6,5,4,3,2,1}我记得它在C和C++中都是允许的,但通过完全不同的语言机制。我相信在C++中,正式的观点是它是通过显式类型转换(T)构造一个未命名的临时对象。cast-expression将减少为static_cast,通过C++11§5.2.9/4构造一个对象:”anexpressionecanbeexplicitlyconvertedtoatypeTusingastatic_castoftheformstatic_cast(e)ifthedeclarationTt(e);iswe