- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我的项目使用 Android NDK,我在构建时遇到上述错误。
ndk.dir=C\:\\Users\\Jang\\AppData\\Local\\Android\\sdk\\ndk-bundle
sdk.dir=C\:\\Users\\Jang\\AppData\\Local\\Android\\sdk
这是我的build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "uk.digitalsquid.netspoofer"
minSdkVersion 10
targetSdkVersion 21
}
buildTypes {
release {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
sourceSets.main.jni.srcDirs = []
}
dependencies {
compile 'com.android.support:support-v4:23.0.0'
compile 'com.google.android.gms:play-services:7.8.0'
compile 'org.jsoup:jsoup:1.8.3'
compile project(':androidsupportv4preferencefragment')
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkLibsToJar, ndkBinariesToJar, ndkBinariesToJar16, ndkDataToJar
}
task ndkLibsToJar(type: Zip, dependsOn: 'ndkBuild', description: 'Create a JAR of the native libs') {
destinationDir new File(buildDir, 'libs')
baseName 'ndk-libs'
extension 'jar'
from(new File(buildDir, 'libs')) {
include '**/*.so'
}
into 'lib/'
}
task ndkBinariesToJar(type: Zip, dependsOn: 'ndkBuild', description: 'Create a JAR of the native binaries') {
destinationDir new File(buildDir, 'libs')
baseName 'ndk-binaries'
extension 'jar'
from(new File(buildDir, 'libs')) {
include '**/arp-scan'
include '**/arpspoof'
include '**/iptables'
}
into 'assets/binaries/android-9'
}
task ndkBinariesToJar16(type: Zip, dependsOn: 'ndkBuild16', description: 'Create a JAR of the native binaries for Android 16+') {
destinationDir new File(buildDir, 'libs')
baseName 'ndk-binaries-16'
extension 'jar'
from(new File(buildDir, 'android-16/libs')) {
include '**/arp-scan'
include '**/arpspoof'
include '**/iptables'
}
into 'assets/binaries/android-16'
}
task ndkDataToJar(type: Zip, dependsOn: 'ndkBuild', description: 'Create a JAR of the native data') {
destinationDir new File(buildDir, 'libs')
baseName 'ndk-data'
extension 'jar'
from(new File('src/main/jni/arp-scan')) {
include '**/ieee-iab.txt'
include '**/ieee-oui.txt'
include '**/mac-vendor.txt'
}
into 'assets/data/'
}
task ndkBuild(type: Exec, description: 'Compile JNI source via NDK') {
def ndkDir = project.plugins.findPlugin('com.android.application').sdkHandler.getNdkFolder()
println(ndkDir)
commandLine "$ndkDir/ndk-build.cmd",
'NDK_PROJECT_PATH=build',
'APP_BUILD_SCRIPT=src/main/jni/Android.mk',
'NDK_APPLICATION_MK=src/main/jni/Application.mk',
'-j1'
}
task ndkBuild16(type: Exec, description: 'Compile JNI source via NDK for Android 16+') {
def ndkDir = project.plugins.findPlugin('com.android.application').sdkHandler.getNdkFolder()
println(ndkDir)
commandLine "$ndkDir/ndk-build.cmd",
'NDK_PROJECT_PATH=build/android-16',
'APP_BUILD_SCRIPT=src/main/jni/Android.mk',
'NDK_APPLICATION_MK=src/main/jni/Application-16.mk',
'-j1'
}
这是构建日志:
Information:Gradle tasks [:androidnetspoof:assembleDebug]
C:\Users\Jang\AppData\Local\Android\sdk\ndk-bundle
C:\Users\Jang\AppData\Local\Android\sdk\ndk-bundle
:androidnetspoof:preBuild
:androidsupportv4preferencefragment:compileLint UP-TO-DATE
:androidnetspoof:preDebugBuild
:androidsupportv4preferencefragment:copyReleaseLint UP-TO-DATE
:androidnetspoof:checkDebugManifest UP-TO-DATE
:androidsupportv4preferencefragment:preBuild
:androidnetspoof:preReleaseBuild UP-TO-DATE
:androidsupportv4preferencefragment:preBuild UP-TO-DATE
:androidsupportv4preferencefragment:preReleaseBuild
:androidnetspoof:generateDebugBuildConfig UP-TO-DATE
:androidsupportv4preferencefragment:checkReleaseManifest
:androidsupportv4preferencefragment:preDebugAndroidTestBuild UP-TO-DATE
:androidsupportv4preferencefragment:preDebugBuild UP-TO-DATE
:androidsupportv4preferencefragment:preDebugUnitTestBuild UP-TO-DATE
:androidsupportv4preferencefragment:preReleaseUnitTestBuild UP-TO-DATE
:androidsupportv4preferencefragment:prepareComAndroidSupportSupportV42300Library UP-TO-DATE
:androidnetspoof:generateDebugAssets UP-TO-DATE
:androidnetspoof:generateDebugResValues UP-TO-DATE
:androidsupportv4preferencefragment:preReleaseBuild UP-TO-DATE
:androidsupportv4preferencefragment:prepareReleaseDependencies
:androidnetspoof:ndkBuild
:androidsupportv4preferencefragment:compileReleaseAidl UP-TO-DATE
:androidsupportv4preferencefragment:compileReleaseRenderscript UP-TO-DATE
:androidsupportv4preferencefragment:generateReleaseBuildConfig UP-TO-DATE
:androidsupportv4preferencefragment:generateReleaseAssets UP-TO-DATE
:androidsupportv4preferencefragment:mergeReleaseAssets UP-TO-DATE
:androidsupportv4preferencefragment:generateReleaseResValues UP-TO-DATE
:androidsupportv4preferencefragment:generateReleaseResources UP-TO-DATE
:androidsupportv4preferencefragment:mergeReleaseResources UP-TO-DATE
:androidsupportv4preferencefragment:processReleaseManifest UP-TO-DATE
:androidsupportv4preferencefragment:processReleaseResources UP-TO-DATE
:androidsupportv4preferencefragment:generateReleaseSources UP-TO-DATE
:androidsupportv4preferencefragment:processReleaseJavaRes UP-TO-DATE
:androidsupportv4preferencefragment:compileReleaseJavaWithJavac UP-TO-DATE
:androidsupportv4preferencefragment:extractReleaseAnnotations UP-TO-DATE
:androidsupportv4preferencefragment:mergeReleaseProguardFiles UP-TO-DATE
:androidsupportv4preferencefragment:packageReleaseJar UP-TO-DATE
:androidsupportv4preferencefragment:compileReleaseNdk UP-TO-DATE
:androidsupportv4preferencefragment:packageReleaseJniLibs UP-TO-DATE
:androidsupportv4preferencefragment:packageReleaseLocalJar UP-TO-DATE
:androidsupportv4preferencefragment:packageReleaseRenderscript UP-TO-DATE
:androidsupportv4preferencefragment:packageReleaseResources UP-TO-DATE
:androidsupportv4preferencefragment:bundleRelease UP-TO-DATE
process_begin: CreateProcess(NULL, realpath obj, ...) failed.
process_begin: CreateProcess(NULL, realpath obj, ...) failed.
Warning:warning: overriding commands for target `/extensions/gen_initext.c'
Warning:warning: ignoring old commands for target `/extensions/gen_initext.c'
process_begin: CreateProcess(NULL, realpath obj, ...) failed.
Warning:warning: overriding commands for target `/extensions/gen_initext.c'
Warning:warning: ignoring old commands for target `/extensions/gen_initext.c'
process_begin: CreateProcess(NULL, realpath obj, ...) failed.
Warning:warning: overriding commands for target `/extensions/gen_initext.c'
Warning:warning: ignoring old commands for target `/extensions/gen_initext.c'
C:\Users\Jang\AppData\Local\Android\sdk\ndk-bundle\build\core\build-binary.mk
Warning:(464) warning: overriding commands for target `build/obj/local/armeabi/objs/ext/extensions/libipt_standard.o'
Warning:(464) warning: ignoring old commands for target `build/obj/local/armeabi/objs/ext/extensions/libipt_standard.o'
Warning:(464) warning: overriding commands for target `build/obj/local/armeabi-v7a/objs/ext/extensions/libipt_standard.o'
Warning:(464) warning: ignoring old commands for target `build/obj/local/armeabi-v7a/objs/ext/extensions/libipt_standard.o'
Warning:(464) warning: overriding commands for target `build/obj/local/mips/objs/ext/extensions/libipt_standard.o'
Warning:(464) warning: ignoring old commands for target `build/obj/local/mips/objs/ext/extensions/libipt_standard.o'
Warning:(464) warning: overriding commands for target `build/obj/local/x86/objs/ext/extensions/libipt_standard.o'
Warning:(464) warning: ignoring old commands for target `build/obj/local/x86/objs/ext/extensions/libipt_standard.o'
[armeabi] Install : arp-scan => libs/armeabi/arp-scan
[armeabi] Install : arpspoof => libs/armeabi/arpspoof
mkdir -p /extensions/
The syntax of the command is incorrect.
make.exe: *** [/extensions/gen_initext.c] Error 1
:androidsupportv4preferencefragment:prepareReleaseDependencies FAILED
Error:Execution failed for task ':androidnetspoof:ndkBuild'.
> Process 'command 'C:\Users\Jang\AppData\Local\Android\sdk\ndk-bundle/ndk-build.cmd'' finished with non-zero exit value 2
最佳答案
如果它不起作用,请将 ndkBuild 任务 commandLine
的标志更改为 -j1 以确保它不会并行构建:
commandLine "$ndkDir/ndk-build.cmd",
'NDK_PROJECT_PATH=build',
'APP_BUILD_SCRIPT=src/main/jni/Android.mk',
'NDK_APPLICATION_MK=src/main/jni/Application.mk',
'-j1'
发生此错误是因为在 makefile custom-android-iptabes/Android.mk
中有一个执行 mkdir -p/extensions/
的脚本,即 基于 UNIX,而我假设您正在尝试从基于 DOS 的 Windows 进行构建。
您需要做的是将那些基于 UNIX 的脚本转换为基于 DOS 的脚本,例如,在本例中,mkdir\extensions\
关于android - 错误 :Execution failed for task 'ndkBuild' . > 进程 'command ' Android\sdk\ndk-bundle/ndk-build.cmd'' 以非零退出值 2 完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32440302/
这个问题已经有答案了: Difference between $Bundle install and $Bundle update (2 个回答) 已关闭 9 年前。 bundle 之间有什么区别,
我正在尝试加载 Nib ,但不断收到以下错误: -[NSViewController initWithCoder:] could not instantiate an NSViewController
bundle有什么区别& bundler命令? bundle有什么区别& bundle install ? 如果没有区别,为什么有多个命令做同样的事情? 最佳答案 可执行文件 bundle & bun
我们有托管在应用程序中的单元测试。要加载测试资源,我们使用:Bundle(for: TestClass.self).path(forResource: "some-file", ofType: "js
我刚刚克隆了一个新的 repo 并尝试运行 bundle install但出现以下错误 Fetching gem metadata from https://abcderepos.net/api/ge
我添加了一个共享框架来在应用程序和 watch 扩展之间共享代码。后来我删除了共享框架,因为它会导致很多问题。我可以 build 并在 iphone 上运行我的应用程序并观看。然而,当我提交到应用商店
这个问题有点类似于 this one ,但不完全是。我有一个 C# 游戏引擎,我正在与一些想要使用我的引擎的人一起工作。最初我设计了引擎,以便所有 Assets 都是外部的——非程序员可以创建艺术、音
我正在尝试使用 OSGi 实现客户端-服务器模型。服务器应用程序是在计算机中运行的 OSGi 框架,客户端应用程序远程连接到其控制台并通过 Java 套接字发送命令并接收正确的响应。每个客户端应用程序
我目前正在将我的 Angular 2 应用程序与 WebPack bundle 在一起。我们仍在快速循环,因此我们不想在构建和应用程序加载过程中增加延迟,而是希望包括很少更改的 Angular 2 U
基本上,我有一个捆绑软件,经常在其他 View 中使用,加上其他js文件,因此我可以在保留其顺序的同时将这些文件添加到现有捆绑软件中吗? 最佳答案 我到处都在查找它,但找不到将两个捆绑软件合并在一起的
我有一个大约 12GB 的巨大 mercurial 存储库。我需要在另一台机器上克隆它,但是从网络中提取它需要花费很多时间。当我尝试将所有变更集 bundle 到一个 bundle 文件中时,文件的大
我可以使用 Sonata User Bundle 将 FOS 包集成到 sonata Admin 包中。我的登录功能正常。现在我想添加 FOSUserBundle 中的更改密码等功能到 sonata
如果我检查使用 angular-cli 创建的 angular 2 项目的 index.html 文件,我可以看到该页面仅包含 dist 文件夹中的 3 个文件: inline.bundle.js v
我从程序包管理器http://localhost:4502/crx/packmgr/index.jsp中从正在运行的AEM实例下载了一个zip文件。提取后的zip文件包含jcr_root和META-I
已经提出了有关捆绑名称和捆绑显示名称的类似问题,例如: What's the difference between "bundle display name" and "bundle name" in
我正在尝试在 iTunes 上上传我的应用程序。为此,我创建了一个应用程序 ID 并保留了一个包标识符。在我的项目中,我更改了 info.plist 文件中的包标识符。但是,当我尝试在 itunes
我想从 OSGI 包启动 OSGI 包。正如您所看到的,此代码通过从目录部署它来启动 bundle : private void installStartBundle(BundleContext bc
所以这真的让我头疼,我终于放弃了,在这里发表了问题。我正在尝试更新iTune商店中的一个客户端应用程序,并且在上传到App Store时遇到以下错误。 因此,我已经尝试通过两次使用包sid id创建新
我在 typescript 中使用 aurelia,我想避免使用像这样的相对导入路径: import { DialogBox } from '../../resources/elements/dial
有什么区别 ResourceBundle.getBundle("Bundle") 还有这个 ResourceBundle.getBundle("/Bundle") 最佳答案 来自the Java do
我是一名优秀的程序员,十分优秀!