我有一个使用 Java 8 功能的 android 库项目,即通过
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Run Code Online (Sandbox Code Playgroud)
将输出 AAR 绑定到 Xamarin.Android 时,绑定项目编译正常。但是,当尝试在 Xamarin.Android 应用程序项目中使用绑定项目时,出现以下错误:
2>COMPILETODALVIK : Uncaught translation error : com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
2>COMPILETODALVIK : Uncaught translation error : com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
2>COMPILETODALVIK : Uncaught translation error : com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
2>COMPILETODALVIK : Uncaught translation error : com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26) …
Run Code Online (Sandbox Code Playgroud) 我收到了一封关于Google Analytics过度搜索的电子邮件,按照电子邮件中的说明,我在跟踪器XML中添加了"ga_sampleFrequency",并以编程方式将"setSampleRate"设置为1%.但是,在应用程序发布一个多月后,Google Analytics控制台上的点击次数似乎根本没有变化!
<string name="ga_sampleFrequency">1.0</string>
Run Code Online (Sandbox Code Playgroud)
和
setSampleRate(1.0);
Run Code Online (Sandbox Code Playgroud)
上述两者似乎都没有实际起作用.
有人有什么想法吗?
谢谢!
从React Native 0.18升级到0.22 for Android后,我开始收到以下错误:
Got JS Exception: SyntaxError: Strict mode does not allow function declarations in a lexically nested statement.
Run Code Online (Sandbox Code Playgroud)
它在启动应用程序时崩溃了应用程序,无法启动调试.
正如本文所述,我试图手动删除所有'use strict'以及使用构建脚本:
gulp.task('transform-android', function() {
return gulp.src(config.tasks.androidjs.src)
.pipe(envify({NATIVE: true}))
.pipe(babel({
"stage": 0,
blacklist: ["useStrict"]
}))
.pipe(gulp.dest(path.join(config.root.dest, config.tasks.androidjs.dest)));
});
Run Code Online (Sandbox Code Playgroud)
生成的代码中不再存在"use strict".但是,我仍然得到完全相同的错误.我正在使用babel v5.8.3.
任何帮助都非常感谢!
这是我的package.json
{
"name": "xodo",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "node_modules/react-native/packager/packager.sh"
},
"author": "",
"license": "ISC",
"dependencies": {
"events": "^1.1.0",
"firebase": "^2.3.1",
"flux": "^2.0.1",
"immutable": "3.7.3",
"jwt-decode": "^1.4.0",
"linkifyjs": "^2.0.0-beta.7",
"lodash": "^3.10.1",
"promise-queue": …
Run Code Online (Sandbox Code Playgroud)