草庐IT

read_file

全部标签

安卓工作室 0.8.14 : Duplicate files during packaging of APK

尝试使用AndroidStudio0.8.14构建我的应用程序时,出现以下错误:Error:duplicatefilesduringpackagingofAPKC:\Users\pc2_2\Desktop\DOSTTracker\app\build\outputs\apk\app-debug-unaligned.apkPathinarchive:META-INF/LICENSEOrigin1:C:\Users\pc2_2\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.4.

android - 在运行时请求 READ_PROFILE 权限

根据Android文档(https://developer.android.com/reference/android/provider/ContactsContract.Profile.html),我需要请求android.permission.READ_PROFILE权限才能读取用户的个人资料信息。但是,当我尝试创建运行时权限请求时,没有可以使用的Manifest.permission.READ_PROFILE。我是否只使用Manifest.permission.READ_CONTACTS权限?注意:AndroidManifest.xml文件可以找到权限就好了:

android - Gradle 同步失败 : Read Timed Out

这个问题在这里已经有了答案:AndroidStudioGradleBuildError:ReadTimeOut(21个答案)关闭2年前。#Project-wideGradlesettings.#IDE(e.g.AndroidStudio)users:#GradlesettingsconfiguredthroughtheIDE*willoverride*#anysettingsspecifiedinthisfile.#Formoredetailsonhowtoconfigureyourbuildenvironmentvisit#http://www.gradle.org/docs/cur

java - Android:什么是 "Bad file number"SocketException?

我在尝试从Android应用程序的套接字中读取时收到“SocketException:错误的文件编号”,我不知道这意味着什么。我已经用谷歌搜索了它,但没有找到任何关于它是什么的解释。有任何想法吗?谢谢。 最佳答案 这通常是底层套接字被关闭的结果。“编号”是因为底层C代码中的文件句柄使用文件编号来标识句柄。socket可能被你关闭了,但也有可能被安全异常、网络不稳定等关闭。 关于java-Android:什么是"Badfilenumber"SocketException?,我们在Stack

java - 安卓.view.InflateException : Binary XML file line #8: Error inflating class fragment

我正在尝试将布局膨胀为fragment我有#8:错误膨胀类fragment我的View甚至没有创建它落在膨胀如何正确充气布局?我的XML大:我的容器:我的fragment布局:android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"android:padding="10sp">Java主程序:myclassjavafirst:packagecom.project.places;importandroid.app.Activity;import

关于在使用DataGrip时连接mysql是报错:java.io.EOFException: Can not read response from server. Expected to ......

今天查看项目的数据库的时候,DataGrip报了一个错误,错误如下:java.io.EOFException:Cannotreadresponsefromserver.Expectedtoread4bytes,read0bytesbeforeconnectionwasunexpectedlylost.java.io.EOFException:Cannotreadresponsefromserver.Expectedtoread4bytes,read0bytesbeforeconnectionwasunexpectedlylost.该错误的表现就是localhost下的所有数据库都打不开,点击任

Java 612 - new File创建文件的几种方式

前言​​​​Java内置类java.io.File类提供了多种创建文章的方式,在本文里我们会介绍其中的几种外加代码演示。以下是File类提供的一些构造函数的介绍:File(Stringpathname):根据指定路径名创建File对象,路径名可以是相对路径或绝对路径。例如:Filefile=newFile("example.txt");File(Stringparent,Stringchild):根据指定的父路径和子路径创建File对象。例如:Filefile=newFile("C:\Users\Admin","example.txt");File(Fileparent,Stringchild

android - FileNotFoundException : Unable to read anonymization settings, 未报告任何值 :/Users/mac/. android/analytics.settings(权限被拒绝)

我在Mac上使用最新版本的AndroidStudio。每当我打开应用程序时,它都会显示上述错误。谁能帮我解决它?这里还有一张图片: 最佳答案 我在这里遇到了同样的问题,但是进入了ubuntu16.04。根据@madhan的评论,我看到我的.android的权限仅适用于root用户,所以我确实更改了该文件夹的所有者,仅此而已。我使用此命令更改文件夹所有者:sudochown-Rdavidg:davidg.android/请将“davidg:davidg”替换为您自己的用户。现在一切正常。我假设在第一个androidstudio启动时,

java - 安卓 : save a Bitmap to bmp file format

我在内存中有一个位图,我需要将它保存在一个bmp文件中(使用bmpfileformat)。有什么办法可以在Android上实现吗?(我读了很多建议使用png格式的帖子-这是无损的-但是,这不是我需要的:我真的需要bmp格式)。我已经有一些代码可以使用Bitmap.compress将其保存为jpeg或png格式方法:/***Savedatatofileusingformat.*Whenformatisnull:thebitmapwillbesavedinbmpformat**/publicvoidwriteBitmapToFile(Bitmapdata,Filefile,Bitmap.C

android - 构建播放器时出错 : IOException: Failed to Move File

当我尝试在Unity3d上使用在androidstudio中创建的.aar插件时,我不断收到此错误ErrorbuildingPlayer:IOException:FailedtoMoveFile/Directoryfrom'Temp/StagingArea\android-libraries\app-release\classes.jar'to'Temp/StagingArea\android-libraries\app-release\libs\classes.jar'. 最佳答案 在gradle中使用提供的范围。https://