<kbd id="9plqc"><label id="9plqc"></label></kbd>

        <th id="9plqc"></th>
        1. <center id="9plqc"><video id="9plqc"></video></center>
          <sub id="9plqc"><form id="9plqc"><pre id="9plqc"></pre></form></sub>
          <nav id="9plqc"><form id="9plqc"><legend id="9plqc"></legend></form></nav>
          Android Studio,無法找到項目,下載后打開文件 您所在的位置:網(wǎng)站首頁 屬蛇的跟屬馬的配不配對 Android Studio,無法找到項目,下載后打開文件

          Android Studio,無法找到項目,下載后打開文件

          2023-06-12 07:50| 來源: 網(wǎng)絡(luò)整理| 查看: 265

          在Android Studio中,我收到兩個不同的錯誤,第一個是:"Unable to found item",然后是:"Access denied“。當(dāng)我在下載文件后打開它時,就會發(fā)生這種情況。我有以下權(quán)限:

          正在下載文件,但我無法讀取它們。下面是我的代碼:

          //first error by this way //String PATH = "/data/data/com.myproj.myproj/attafiles/"; //File folder = new File(PATH); // if (!folder.exists()) { // folder.mkdirs(); // } //URL url = new URL(imageURL); //File file = new File(folder , fileName); //Second error URL url = new URL(imageURL); File file = new File(context.getFilesDir(), fileName); URLConnection ucon = url.openConnection(); InputStream is = ucon.getInputStream(); BufferedInputStream bis = new BufferedInputStream(is); ByteArrayBuffer baf = new ByteArrayBuffer(50); int current = 0; while ((current = bis.read()) != -1) { baf.append((byte) current); } FileOutputStream fos = new FileOutputStream(file); fos.write(baf.toByteArray());fos.close(); Uri path = Uri.fromFile(file); String fileExtension= MimeTypeMap.getFileExtensionFromUrl(path.toString()); String mimeType= MimeTypeMap.getSingleton().getMimeTypeFromExtension(fileExtension); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(path, mimeType); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent);


          【本文地址】

          公司簡介

          聯(lián)系我們

          今日新聞

          推薦新聞

          專題文章
            CopyRight 2018-2019 實驗室設(shè)備網(wǎng) 版權(quán)所有
            黄色免费网站在线看,韩国精品在线观看,韩国美女一区二区,99国产热 容城县| 张家港市| 临高县| 四会市| 乌拉特前旗| 鹿泉市| 老河口市| 涡阳县| 盱眙县| 阜平县| 印江| 色达县| 拉孜县| 彰化县| 广水市| 内丘县| 湖南省| 青岛市| 临潭县| 双柏县| 新郑市| 若尔盖县| 北票市| 承德县| 福州市| 渭南市| 墨竹工卡县| 甘南县| 乐平市| 汾西县| 交口县| 宝兴县| 沅江市| 福建省| 叶城县| 保康县| 濮阳县| 阿克陶县| 忻州市| 启东市| 石楼县| http://444 http://444 http://444 http://444 http://444 http://444