DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: cuiqingbo
今日帖子: 25
在线用户: 14
导航: 论坛 -> 移动应用开发 斑竹:flyers,iamdream  
作者:
男 hnyinping (hnyinping) ★☆☆☆☆ -
普通会员
2018/6/30 17:59:43
标题:
报错找不到文件或abstract error 浏览:940
加入我的收藏
楼主:  if System.SysUtils.FileExists(TPath.GetSharedDocumentsPath + '/update.txt') then
    begin
      try
        getstring := TStrings.Create;
        getstring.LoadFromFile(TPath.GetSharedDocumentsPath + '/update.txt');
        oldbanben := getstring.Strings[0].ToInteger;

      finally
        getstring.Free;
      end;
      //System.SysUtils.DeleteFile(TPath.GetSharedDocumentsPath + '/update.txt');
      if newbanben>oldbanben then
      begin
        flag := true;
        ShowMessage('成功');
      end
      else
      begin
        flag := False;
        ShowMessage('失败');
      end;
     // ShowMessage('找到update.txt');

    end
    else
    begin
     // flag := True;
          //没有找到update.txt文件,也升级
          ShowMessage('没找到update.txt');
    end;
显示“没找到update.txt”如果把TPath.GetSharedDocumentsPath改成TPath.GetDocumentsPath把错abstract error
请问如何才能显示“成功”

update.txt也发布到.\assets\internal\了
----------------------------------------------
-
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2018/7/1 8:01:41
1楼: 查看帮助中的功能之间的区别(同样可以用于:Windows XP及更高版本,iOS X和模拟器,Android)但请先阅读文本!
-------
See the difference between to Function in Help (same that it can be used in: Windows XP and later, iOS X and simulator, Android) but read the text first!


http://docwiki.embarcadero.com/Libraries/Berlin/en/System.IOUtils.TPath.GetSharedDocumentsPath

Android --->  /storage/emulated/0/Documents


---->>> LOOK AT
Returns the path to the directory where documents shared between users are stored.
返回存储用户之间共享文档的目录的路径。


Note: In desktop applications, "shared" means "shared between different users". In mobile applications, "shared" means "shared between different applications".

注意:在桌面应用程序中,“共享”表示“在不同用户之间共享”。 在移动应用程序中,“共享”意味着“在不同应用程序之间共享”。
----------

http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.IOUtils.TPath.GetDocumentsPath

Returns the path to the directory where user documents are stored.
返回存储用户文档的目录的路径。

If the system running your application does not support the requested folder, or if the requested folder does not exist in the system, this function returns an empty string instead.

如果运行应用程序的系统不支持所请求的文件夹,或者系统中不存在请求的文件夹,则此函数将返回空字符串。

Android --->  /data/data/<application ID>/files
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
作者:
男 wang_80919 (Flying Wang) ★☆☆☆☆ -
普通会员
2018/7/1 10:03:12
2楼: 楼主 DEBUG 模式 IDE 提示错误的时候 点 BREAK 看 CALLSTACK。
不过,很多人都不相信,或者懒得去这样做。
问题,就不了了之了。
----------------------------------------------
(C)(P)Flying Wang
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行70.3125毫秒 RSS