- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我已成功在我的 Android NDK 项目中构建 CLAPACK。接下来,我尝试将 IT++ 4.2 库放入其中。但是,我有一些无法修复的错误。这些是我在我的项目中所做的事情:
首先,我将itpp文件夹复制到我项目的jni文件夹中,并修改了itpp中的config.h。
因为我在(放在..android-ndk-r7b\platforms\android-9\arch-arm\usr\include中)找到了isfinite、isinf和isnan函数。我将 HAVE_DECL_ISINF、HAVE_DECL_ISFINITE 和 HAVE_DECL_ISNAN 设置为 1。
config.h
#ifndef CONFIG_H
#define CONFIG_H
/* Define to dummy `main' function (if any) required to link to the Fortran
libraries. */
/* #undef F77_DUMMY_MAIN */
/* Define if F77 and FC dummy `main' functions are identical. */
/* #undef FC_DUMMY_MAIN_EQ_F77 */
/* Define to 1 if you have the `acosh' function. */
#define HAVE_ACOSH 1
/* Define to 1 if you have the `asinh' function. */
#define HAVE_ASINH 1
/* Define to 1 if you have the `atanh' function. */
#define HAVE_ATANH 1
/*#if defined(HAVE_ACML) || defined(HAVE_MKL)
/* Define if you have a BLAS library. */
#define HAVE_BLAS 1
/*#endif
#ifdef HAVE_ACML
/* Define if you have an ACML BLAS library. */
/*# define HAVE_BLAS_ACML 1
/*#endif
/* Define if you have an ATLAS BLAS library. */
/* #undef HAVE_BLAS_ATLAS */
/*#ifdef HAVE_MKL
/* Define if you have an MKL BLAS library. */
/*# define HAVE_BLAS_MKL 1
/*#endif
/* Define to 1 if you have the `cbrt' function. */
# define HAVE_CBRT 1
/* Define to 1 if you have the <cmath> header file. */
/*#define HAVE_CMATH 1
/* Define to 1 if you have the <complex> header file. */
/*#define HAVE_COMPLEX 1
/* Define to 1 if you have the declaration of `isfinite', and to 0 if you
don't. */
#define HAVE_DECL_ISFINITE 1
/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't.
*/
#define HAVE_DECL_ISINF 1
/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't.
*/
#define HAVE_DECL_ISNAN 1
/* Define to 1 if you have the declaration of `signgam', and to 0 if you
don't. */
/*#define HAVE_DECL_SIGNGAM 0
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `erf' function. */
#define HAVE_ERF 1
/* Define to 1 if you have the `erfc' function. */
#define HAVE_ERFC 1
/* Define to 1 if you have the `expm1' function. */
/* #undef HAVE_EXPM1 */
/* Define if the compiler supports extern template */
/* #undef HAVE_EXTERN_TEMPLATE */
#if defined(HAVE_ACML) || defined(HAVE_MKL)
/* Define if you have FFT library. */
# define HAVE_FFT 1
#endif
/* Define if you have FFTW3 library. */
/* #undef HAVE_FFTW3 */
#ifdef HAVE_ACML
/* Define if you have ACML FFT library. */
# define HAVE_FFT_ACML 1
#endif
#ifdef HAVE_MKL
/* Define if you have MKL FFT library. */
# define HAVE_FFT_MKL 1
#endif
/* Define to 1 if you have the `finite' function. */
#define HAVE_FINITE 1
/* Define to 1 if you have the `fpclass' function. */
/*#define HAVE_FPCLASS 1
/* Define to 1 if you have the <ieeefp.h> header file. */
/* #undef HAVE_IEEEFP_H */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `isfinite' function. */
#define HAVE_ISFINITE 1
/* Define to 1 if you have the `isinf' function. */
/* #undef HAVE_ISINF */
/* Define to 1 if you have the `isnan' function. */
/*#define HAVE_ISNAN 1
/*#if defined(HAVE_ACML) || defined(HAVE_MKL)
/* Define if you have LAPACK library. */
#define HAVE_LAPACK 1
/*#endif
/* Define to 1 if you have the `lgamma' function. */
/* #undef HAVE_LGAMMA */
/* Define to 1 if you have the `log1p' function. */
/* #undef HAVE_LOG1P */
/* Define to 1 if you have the `log2' function. */
/* #undef HAVE_LOG2 */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `rint' function. */
#define HAVE_RINT 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `std::isfinite' function. */
/* #undef HAVE_STD_ISFINITE */
/* Define to 1 if you have the `std::isinf' function. */
/* #undef HAVE_STD_ISINF */
/* Define to 1 if you have the `std::isnan' function. */
/* #undef HAVE_STD_ISNAN */
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the `tgamma' function. */
/* #undef HAVE_TGAMMA */
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you use zdotusub_ Fortran wrapper. */
/* #undef HAVE_ZDOTUSUB */
/* Define if "void zdotu_()" should be used. */
#define HAVE_ZDOTU_VOID 1
/* Define if you want exceptions handling */
/* #undef ITPP_EXCEPTIONS */
/* Name of package */
#define PACKAGE "itpp"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "ediap@users.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "IT++"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "IT++ 4.0.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "itpp"
/* Define to the version of this package. */
#define PACKAGE_VERSION "4.0.0"
/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 4
/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8
/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT 2
/* The size of `unsigned int', as computed by sizeof. */
#define SIZEOF_UNSIGNED_INT 4
/* The size of `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG 4
/* The size of `unsigned long long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG_LONG 8
/* The size of `unsigned short', as computed by sizeof. */
#define SIZEOF_UNSIGNED_SHORT 2
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
/* #undef TIME_WITH_SYS_TIME */
/* Version number of package */
#define VERSION "4.0.0"
#if defined(HAVE_CMATH)
# include <cmath>
#endif
/*#include <math.h>*/
#endif /* #ifndef CONFIG_H */
数学.h
[..]
#define fpclassify(x) \
((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) \
: (sizeof (x) == sizeof (double)) ? __fpclassifyd(x) \
: __fpclassifyl(x))
#define isfinite(x) \
((sizeof (x) == sizeof (float)) ? __isfinitef(x) \
: (sizeof (x) == sizeof (double)) ? __isfinite(x) \
: __isfinitel(x))
#define isinf(x) \
((sizeof (x) == sizeof (float)) ? __isinff(x) \
: (sizeof (x) == sizeof (double)) ? __isinf(x) \
: __isinfl(x))
#define isnan(x) \
((sizeof (x) == sizeof (float)) ? isnanf(x) \
: (sizeof (x) == sizeof (double)) ? isnan(x) \
: __isnanl(x))
#define isnormal(x) \
((sizeof (x) == sizeof (float)) ? __isnormalf(x) \
: (sizeof (x) == sizeof (double)) ? __isnormal(x) \
: __isnormall(x))
[..]
但是,当我编译 itpp 时,我在 itcompat.h 文件中收到错误
#ifndef ITCOMPAT_H
#define ITCOMPAT_H
#ifndef _MSC_VER
# include <itpp/config.h>
#else
# include <itpp/config_msvc.h>
#endif
//! \cond
// Microsoft Visual C++ underscore prefixed functions
#if defined(_MSC_VER)
# include <cfloat>
# define finite(x) _finite(x)
# define isfinite(x) _finite(x)
# define isnan(x) _isnan(x)
# define fpclass(x) _fpclass(x)
# define FP_NINF _FPCLASS_NINF
# define FP_PINF _FPCLASS_PINF
# define jn(a, b) _jn(a, b)
# define yn(a, b) _yn(a, b)
# define j0(a) _j0(a)
# define j1(a) _j1(a)
#endif // defined(_MSC_VER)
// Solaris uses <ieeefp.h> for declaring isnan() and finite() functions
#if defined(HAVE_IEEEFP_H)
# include <ieeefp.h>
#endif
// These definitions would collide with IT++ functions
#if defined(min)
# undef min
#endif
#if defined(max)
# undef max
#endif
#if defined(log2)
# undef log2
#endif
namespace std
{
#ifndef HAVE_STD_ISINF
#if (HAVE_DECL_ISINF == 1) || defined(HAVE_ISINF)
inline int isinf(double x) { return ::isinf(x); } //line 77
#elif defined(FPCLASS)
inline int isinf(double x)
{
if (::fpclass(a) == FP_NINF) return -1;
else if (::fpclass(a) == FP_PINF) return 1;
else return 0;
}
#else
inline int isinf(double x)
{
if ((x == x) && ((x - x) != 0.0)) return (x < 0.0 ? -1 : 1);
else return 0;
}
#endif // #if (HAVE_DECL_ISINF == 1) || defined(HAVE_ISINF)
#endif // #ifndef HAVE_STD_ISINF
#ifndef HAVE_STD_ISNAN
#if (HAVE_DECL_ISNAN == 1) || defined(HAVE_ISNAN)
inline int isnan(double x) { return ::isnan(x); } //line 96
#else
inline int isnan(double x) { return ((x != x) ? 1 : 0); }
#endif // #if (HAVE_DECL_ISNAN == 1) || defined(HAVE_ISNAN)
#endif // #ifndef HAVE_STD_ISNAN
#ifndef HAVE_STD_ISFINITE
#if (HAVE_DECL_ISFINITE == 1) || defined(HAVE_ISFINITE)
inline int isfinite(double x) { return ::isfinite(x); } //line 104
#elif defined(HAVE_FINITE)
inline int isfinite(double x) { return ::finite(x); }
#else
inline int isfinite(double x)
{
return ((!std::isnan(x) && !std::isinf(x)) ? 1 : 0);
}
#endif // #if (HAVE_DECL_ISFINITE == 1) || defined(HAVE_ISFINITE)
#endif // #ifndef HAVE_STD_ISFINITE
} // namespace std
[..]
转换器.cpp
#include <itpp/base/converters.h>
#include <itpp/base/itcompat.h>
#include <itpp/base/matfunc.h>
#include <itpp/base/math/log_exp.h>
//! \cond
namespace itpp
{
// ----------------------------------------------------------------------
// Vector converters
// ----------------------------------------------------------------------
ivec to_ivec(int s) { ivec out(1); out(0) = s; return out; }
vec to_vec(double s) { vec out(1); out(0) = s; return out; }
cvec to_cvec(double real, double imag)
{
cvec out(1);
out(0) = std::complex<double>(real, imag);
return out;
}
// ----------------------------------------------------------------------
// Miscellaneous converters
// ----------------------------------------------------------------------
bvec dec2bin(int length, int index)
{
int i, bintemp = index;
bvec temp(length);
for (i = length - 1; i >= 0; i--) {
temp(i) = bin(bintemp & 1);
bintemp = (bintemp >> 1);
}
return temp;
}
bvec dec2bin(int index, bool msb_first)
{
int length = int2bits(index);
int i, bintemp = index;
bvec temp(length);
for (i = length - 1; i >= 0; i--) {
temp(i) = bin(bintemp & 1);
bintemp = (bintemp >> 1);
}
if (msb_first) {
return temp;
}
else {
return reverse(temp);
}
}
void dec2bin(int index, bvec &v)
{
int i, bintemp = index;
v.set_size(int2bits(index), false);
for (i = v.size() - 1; i >= 0; i--) {
v(i) = bin(bintemp & 1);
bintemp = (bintemp >> 1);
}
}
int bin2dec(const bvec &inbvec, bool msb_first)
{
int i, temp = 0;
int sizebvec = inbvec.length();
if (msb_first) {
for (i = 0; i < sizebvec; i++) {
temp += pow2i(sizebvec - i - 1) * int(inbvec(i));
}
}
else {
for (i = 0; i < sizebvec; i++) {
temp += pow2i(i) * int(inbvec(i));
}
}
return temp;
}
bvec oct2bin(const ivec &octalindex, short keepzeros)
{
int length = octalindex.length(), i;
bvec out(3*length);
for (i = 0; i < length; i++) {
out.replace_mid(3*i, dec2bin(3, octalindex(i)));
}
//remove zeros if keepzeros = 0
if (keepzeros == 0) {
for (i = 0; i < out.length(); i++) {
if ((short)out(i) != 0) {
return out.right(out.length() - i);
break;
}
}
return bvec("0");
}
else {
return out;
}
}
ivec bin2oct(const bvec &inbits)
{
int start, Itterations = ceil_i(inbits.length() / 3.0);
ivec out(Itterations);
for (int i = Itterations - 1; i > 0; i--) {
start = 3 * i - (3 * Itterations - inbits.length());
out(i) = bin2dec(inbits.mid(start, 3));
}
out(0) = bin2dec(inbits.left(inbits.length() - ((Itterations - 1) * 3)));
return out;
}
ivec bin2pol(const bvec &inbvec)
{
return 1 -2*to_ivec(inbvec);
}
bvec pol2bin(const ivec &inpol)
{
return to_bvec((1 -inpol) / 2);
}
// Round to nearest integer, return result in double
double round(double x) { return ::rint(x); }
// Round to nearest integer
vec round(const vec &x) { return apply_function<double>(::rint, x); }
// Round to nearest integer
mat round(const mat &x) { return apply_function<double>(::rint, x); }
// Round to nearest integer
int round_i(double x) { return static_cast<int>(::rint(x)); }
// Round to nearest integer and return ivec
ivec round_i(const vec &x) { return to_ivec(round(x)); }
// Round to nearest integer and return imat
imat round_i(const mat &x) { return to_imat(round(x)); }
// Round to nearest upper integer
ivec ceil_i(const vec &x) { return to_ivec(ceil(x)); }
// Round to nearest upper integer
imat ceil_i(const mat &x) { return to_imat(ceil(x)); }
// Round to nearest lower integer
ivec floor_i(const vec &x) { return to_ivec(floor(x)); }
// Round to nearest lower integer
imat floor_i(const mat &x) { return to_imat(floor(x)); }
cvec round_to_zero(const cvec &x, double threshold)
{
cvec temp(x.length());
for (int i = 0; i < x.length(); i++)
temp(i) = round_to_zero(x(i), threshold);
return temp;
}
cmat round_to_zero(const cmat &x, double threshold)
{
cmat temp(x.rows(), x.cols());
for (int i = 0; i < x.rows(); i++) {
for (int j = 0; j < x.cols(); j++) {
temp(i, j) = round_to_zero(x(i, j), threshold);
}
}
return temp;
}
cvec round_to_infty(const cvec &in, const double threshold)
{
cvec temp(in.length());
for (int i = 0; i < in.length(); i++)
temp(i) = round_to_infty(in(i), threshold);
return temp;
}
cmat round_to_infty(const cmat &in, const double threshold)
{
cmat temp(in.rows(), in.cols());
for (int i = 0; i < in.rows(); i++) {
for (int j = 0; j < in.cols(); j++) {
temp(i, j) = round_to_infty(in(i, j), threshold);
}
}
return temp;
}
std::string to_str(const double &i, const int precision)
{
std::ostringstream ss;
ss.precision(precision);
ss.setf(std::ostringstream::scientific, std::ostringstream::floatfield);
ss << i;
return ss.str();
}
// ----------------------------------------------------------------------
// Instantiations
// ----------------------------------------------------------------------
template bvec to_bvec(const svec &v);
template bvec to_bvec(const ivec &v);
template svec to_svec(const bvec &v);
template svec to_svec(const ivec &v);
template svec to_svec(const vec &v);
template ivec to_ivec(const bvec &v);
template ivec to_ivec(const svec &v);
template ivec to_ivec(const vec &v);
template vec to_vec(const bvec &v);
template vec to_vec(const svec &v);
template vec to_vec(const ivec &v);
template cvec to_cvec(const bvec &v);
template cvec to_cvec(const svec &v);
template cvec to_cvec(const ivec &v);
template cvec to_cvec(const vec &v);
template cvec to_cvec(const bvec &real, const bvec &imag);
template cvec to_cvec(const svec &real, const svec &imag);
template cvec to_cvec(const ivec &real, const ivec &imag);
template cvec to_cvec(const vec &real, const vec &imag);
template bmat to_bmat(const smat &m);
template bmat to_bmat(const imat &m);
template smat to_smat(const bmat &m);
template smat to_smat(const imat &m);
template smat to_smat(const mat &m);
template imat to_imat(const bmat &m);
template imat to_imat(const smat &m);
template imat to_imat(const mat &m);
template mat to_mat(const bmat &m);
template mat to_mat(const smat &m);
template mat to_mat(const imat &m);
template cmat to_cmat(const bmat &m);
template cmat to_cmat(const smat &m);
template cmat to_cmat(const imat &m);
template cmat to_cmat(const mat &m);
template cmat to_cmat(const bmat &real, const bmat &imag);
template cmat to_cmat(const smat &real, const smat &imag);
template cmat to_cmat(const imat &real, const imat &imag);
template cmat to_cmat(const mat &real, const mat &imag);
} // namespace itpp
//! \endcond
控制台输出:
Compile++ arm : itpp <= converters.cpp
In file included from E:/hello-jni/jni/itpp/base/converters.cpp:30:0:
E:/hello-jni/jni/itpp/base/itcompat.h:77:12: error: expected unqualified-id before 'sizeof'
E:/hello-jni/jni/itpp/base/itcompat.h:77:12: error: expected ')' before 'sizeof'
E:/hello-jni/jni/itpp/base/itcompat.h:77:12: error: expected ')' before 'sizeof'
E:/hello-jni/jni/itpp/base/itcompat.h:96:12: error: expected unqualified-id before 'sizeof'
E:/hello-jni/jni/itpp/base/itcompat.h:96:12: error: expected ')' before 'sizeof'
E:/hello-jni/jni/itpp/base/itcompat.h:96:12: error: expected ')' before 'sizeof'
E:/hello-jni/jni/itpp/base/itcompat.h:104:12: error: expected unqualified-id before 'sizeof'
E:/hello-jni/jni/itpp/base/itcompat.h:104:12: error: expected ')' before 'sizeof'
E:/hello-jni/jni/itpp/base/itcompat.h:104:12: error: expected ')' before 'sizeof'
/cygdrive/e/Soft/android-ndk-r7b/build/core/build-binary.mk:249: recipe for target `obj/local/armeabi-v7a/objs-debug/itpp/itpp/base/converters.o' failed
make: *** [obj/local/armeabi-v7a/objs-debug/itpp/itpp/base/converters.o] Error 1
您能针对我的问题给我一些建议吗?我是 android-ndk 的新手。非常感谢您的帮助!
最佳答案
原因是您将 isinf
定义为宏。稍后,您将尝试使用该名称定义一个函数。
你应该注意到宏在词法分析器工作时扩展(或者甚至作为在此之前的一个 channel )。这意味着它在不了解解析正确性的情况下扩展宏,更不用说上下文了。这就是为什么即使您在命名空间中声明了一个函数,词法分析器也无法理解它并且无论如何都将函数名称作为宏。
要解决此问题,您需要确保 itcompat.h 未定义 isinf
。从头文件的外观来看,似乎需要定义 HAVE_STD_ISINF
。拥有 HAVE_DECL_ISINF
是不够的,因为在那种情况下 isinf
仍在 itcompat.h 中声明。我的猜测是,如果您在 itcompat.h 之前包含 math.h
,它将定义 HAVE_STD_ISINF
本身。
关于c++ - GCC - 'sizeof' 之前的预期不合格 ID - Android NDK 中的 IT++ 4.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9886725/
我想做的是让 JTextPane 在 JPanel 中占用尽可能多的空间。对于我使用的 UpdateInfoPanel: public class UpdateInfoPanel extends JP
我在 JPanel 中有一个 JTextArea,我想将其与 JScrollPane 一起使用。我正在使用 GridBagLayout。当我运行它时,框架似乎为 JScrollPane 腾出了空间,但
我想在 xcode 中实现以下功能。 我有一个 View Controller 。在这个 UIViewController 中,我有一个 UITabBar。它们下面是一个 UIView。将 UITab
有谁知道Firebird 2.5有没有类似于SQL中“STUFF”函数的功能? 我有一个包含父用户记录的表,另一个表包含与父相关的子用户记录。我希望能够提取用户拥有的“ROLES”的逗号分隔字符串,而
我想使用 JSON 作为 mirth channel 的输入和输出,例如详细信息保存在数据库中或创建 HL7 消息。 简而言之,输入为 JSON 解析它并输出为任何格式。 最佳答案 var objec
通常我会使用 R 并执行 merge.by,但这个文件似乎太大了,部门中的任何一台计算机都无法处理它! (任何从事遗传学工作的人的附加信息)本质上,插补似乎删除了 snp ID 的 rs 数字,我只剩
我有一个以前可能被问过的问题,但我很难找到正确的描述。我希望有人能帮助我。 在下面的代码中,我设置了varprice,我想添加javascript变量accu_id以通过rails在我的数据库中查找记
我有一个简单的 SVG 文件,在 Firefox 中可以正常查看 - 它的一些包装文本使用 foreignObject 包含一些 HTML - 文本包装在 div 中:
所以我正在为学校编写一个 Ruby 程序,如果某个值是 1 或 3,则将 bool 值更改为 true,如果是 0 或 2,则更改为 false。由于我有 Java 背景,所以我认为这段代码应该有效:
我做了什么: 我在这些账户之间创建了 VPC 对等连接 互联网网关也连接到每个 VPC 还配置了路由表(以允许来自双方的流量) 情况1: 当这两个 VPC 在同一个账户中时,我成功测试了从另一个 La
我有一个名为 contacts 的表: user_id contact_id 10294 10295 10294 10293 10293 10294 102
我正在使用 Magento 中的新模板。为避免重复代码,我想为每个产品预览使用相同的子模板。 特别是我做了这样一个展示: $products = Mage::getModel('catalog/pro
“for”是否总是检查协议(protocol)中定义的每个函数中第一个参数的类型? 编辑(改写): 当协议(protocol)方法只有一个参数时,根据该单个参数的类型(直接或任意)找到实现。当协议(p
我想从我的 PHP 代码中调用 JavaScript 函数。我通过使用以下方法实现了这一点: echo ' drawChart($id); '; 这工作正常,但我想从我的 PHP 代码中获取数据,我使
这个问题已经有答案了: Event binding on dynamically created elements? (23 个回答) 已关闭 5 年前。 我有一个动态表单,我想在其中附加一些其他 h
我正在尝试找到一种解决方案,以在 componentDidMount 中的映射项上使用 setState。 我正在使用 GraphQL连同 Gatsby返回许多 data 项目,但要求在特定的 pat
我在 ScrollView 中有一个 View 。只要用户按住该 View ,我想每 80 毫秒调用一次方法。这是我已经实现的: final Runnable vibrate = new Runnab
我用 jni 开发了一个 android 应用程序。我在 GetStringUTFChars 的 dvmDecodeIndirectRef 中得到了一个 dvmabort。我只中止了一次。 为什么会这
当我到达我的 Activity 时,我调用 FragmentPagerAdapter 来处理我的不同选项卡。在我的一个选项卡中,我想显示一个 RecyclerView,但他从未出现过,有了断点,我看到
当我按下 Activity 中的按钮时,会弹出一个 DialogFragment。在对话框 fragment 中,有一个看起来像普通 ListView 的 RecyclerView。 我想要的行为是当
我是一名优秀的程序员,十分优秀!