我正在开发一个Android库模块,其中必须包含Crosswalk Webview.我使用Github Sonatype(https://github.com/sonatype/)创建库.没有Crosswalk Webview,它可以正常工作.我尝试了以下3种方法来包含Crosswalk.
方法1:
在我的库项目应用程序gradle中添加Crosswalk Webview库
错误:(编译错误)
无法解决:org.xwalk:xwalk_core_library:18.48.477.13
方法2:
在我的库项目中添加crosswalk aar文件
添加aar文件的参考链接如何将.aar文件导入Android Studio 1.1.0并在我的代码中使用它
我从https://download.01.org/crosswalk/releases/crosswalk/android/stable/18.48.477.13/下载了Crosswalk Webview
错误:(编译错误)
无法解决:MyLIBApplication:xwalk_core_library_java:未指定
方法3:
在我的库项目中添加crosswalk jar文件
下载链接 https://download.01.org/crosswalk/releases/crosswalk/android/stable/18.48.477.13/
错误:此方法没有编译错误,但它给出了运行时错误,即java.lang.NoClassDefFoundError:org.xwalk.core.R $ string
注意:我尝试了两种jar(普通,共享模式)文件
我有两个问题1)注释不起作用2)我想在线阅读pdf文档
我使用此链接构建MuPDF http://mupdf.com/doc/how-to-build-mupdf-for-android
1)我得到项目mupdf/platform/android我运行该默认应用程序注释工作正常,但我创建该项目到库文件,他们要求保存但注释不保存.
2)它将读取本地文件,但我也想读取在线文件.我的android代码
pdf = (TextView) findViewById(R.id.pdf);
onPdf = (TextView) findViewById(R.id.onPdf);
pdf.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Uri uri = Uri.parse(path);
Intent intent = new Intent(context, MuPDFActivity.class);
intent.setAction(Intent.ACTION_VIEW);
intent.setData(uri);
startActivity(intent);
}
});
onPdf.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Uri uri = Uri.parse(netPath);
Intent intent = new Intent(context, MuPDFActivity.class);
intent.setAction(Intent.ACTION_VIEW);
intent.setData(uri);
startActivity(intent);
}
});
Run Code Online (Sandbox Code Playgroud)
修改了MuPDFActivity - 我改变所有文件都是打开openBuffer方法
private MuPDFCore openBuffer(byte buffer[]) {
System.out.println("Trying to open byte buffer");
try {
String magic = ""; …Run Code Online (Sandbox Code Playgroud) Android Fusedlocationproviderclient 无法与 APN Sim 一起使用(这意味着私有互联网,并非所有人都可以访问),它可以与 Wifi 或普通互联网(这意味着全球移动互联网)一起使用,我还尝试了位置管理器(Play 服务无法启用这些设备)。
活动课
import android.Manifest;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Criteria;
import android.location.Location;
//import android.location.LocationListener;
import android.location.LocationManager;
import android.location.LocationProvider;
import android.os.PowerManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.common.GoogleApiAvailability;
import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.location.LocationAvailability;
import com.google.android.gms.location.LocationCallback;
import com.google.android.gms.location.LocationListener;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationResult;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.tasks.OnCanceledListener;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener; …Run Code Online (Sandbox Code Playgroud) android location locationmanager fusedlocationproviderclient
我是ffprobe的新手,我的目标是获取视频fps并存储到java程序中.我的代码存储xml文件,但我想直接像int fps = 30存储;
ffprobe -v quiet -print_format xml -show_format -show_streams "/video/small/small.avi" > "/video/small/test.xml"
Run Code Online (Sandbox Code Playgroud)
这是我的代码.