===============>>#1 票数:64
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#2 票数:36
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#3 票数:29 已采纳
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#4 票数:9
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#5 票数:4
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#6 票数:2
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#7 票数:1
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#8 票数:1
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#9 票数:1
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#10 票数:1
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#11 票数:1
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#12 票数:0
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#13 票数:0
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#14 票数:0
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
===============>>#15 票数:0
我的应用程序资产文件夹中保存了一个数据库,并在应用程序首次打开时使用以下代码复制该数据库。
inputStream = mContext.getAssets().open(Utils.getDatabaseName());
if(inputStream != null) {
int mFileLength = inputStream.available();
String filePath = mContext.getDatabasePath(Utils.getDatabaseName()).getAbsolutePath();
// Save the downloaded file
output = new FileOutputStream(filePath);
byte data[] = new byte[1024];
long total = 0;
int count;
while ((count = inputStream.read(data)) != -1) {
total += count;
if(mFileLength != -1) {
// Publish the progress
publishProgress((int) (total * 100 / mFileLength));
}
output.write(data, 0, count);
}
return true;
}
上面的代码运行没有问题,但是当您尝试查询数据库时,您将获得一个SQLite:没有此类表异常。
仅在Android P中会发生此问题,所有早期版本的Android均可正常工作。
这是Android P的已知问题还是有所更改?
ask by Michael J translate from so