ionic发生问题,启动进程prebuilt \ windows-x86_64 \ bin \ mips64el-linux-android-strip

时间:2018-10-22 15:39:56

标签: node.js google-maps cordova ionic-framework

我创建了一个新的离子应用程序

> ionic start myAppNameHere blank

然后按照此link: https://github.com/ionic-team/ionic-native-google-maps/blob/master/documents/README.md,将适用于Android和ios的Google地图添加到我的应用中。我还运行以下命令

> ionic cordova platform add android && ionic cordova build android

但我收到此错误:

  

任务':app:transformNativeLibsWithStripDebugSymbolForDebug'的执行失败。

     

启动过程'命令'C:\ Users \ myusernamehere \ AppData \ Local \ Android \ Sdk \ ndk-bundle \ toolchains \ mips64el-linux-android-4.9 \ prebuilt \ windows-x86_64 \ bin \ mips64el- linux-android-strip''`

有人可以帮助我

1 个答案:

答案 0 :(得分:0)

以下是我在上安装的经验的总结。尤其请参见有关错误的部分。只需按照说明创建虚拟文件夹和子文件夹即可。

Cordova希望看到 C:\Users\myusernamehere\AppData\Local\Android\Sdk\ndk-bundle\toolchains\mips64el-linux-android-4.9\prebuilt\windows-x86_64\bin\mips64el-linux-android-strip 的路径,但不需要(对于我来说),如果不存在,则会抛出错误。

离子科尔多瓦的安装经验。

• Re- install Java JDK 8 to the latest update.
• Add ANDROID_SDK_ROOT variable to point to existing installation of Android Studio SDK
• Add Java JDK\bin to the environment PATH variable on user and system
• Download Gradle 5.2 and create folder C:\Gradle and extract the contents inside. Your 
The path should look like this  
  

C:\Gradle\gradle-5.2\bin\gradle.bat

  • "C:\Gradle\gradle-5.2\bin"添加到系统上的PATH变量

    从命令行执行以下操作。

  
      
  1. export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk
  2.   
  3. export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin
  4.   
  5. export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
  6.   
  7. export PATH=$PATH:$ANDROID_SDK_ROOT/emulator
  8.   
• Using a previously installed edition of Android Studio go to Tools => SDK Tools 
And check the NDK checkbox for download, click apply and ok.
• In the project terminal - Enter 
  

离子科尔多瓦准备android

建造科尔多瓦。
    如果有错误,请删除platforms\android项目目录并重建。
如果出现Gradle错误,则查找NDK "mips64el-linux-android-version"

Do the following ..  

• Open the NDK bundle\toolchains folder within Android SDK eg C:\Users\Shay\AppData\Local\Android\sdk\ndk-bundle\toolchains
• And using command line create a folder "mips64el-linux-android-4.9" ( same version number (4.9) as other folders) inside create folder "prebuilt" .. then folder "windows-x86_64" and inside place and empty text file for contents. 
The created path should look like .. "C:\Users\Shay\AppData\Local\Android\sdk\ndk-bundle\toolchains\mips64el-linux-android-4.9\prebuilt\windows-x86_64\dummy file"  is not required by Cordova but is expected to be in its path .. otherwise it will throw an error and fail to build.

或者,下载较旧的版本,例如https://developer.android.com/ndk/downloads/older_releases/android-ndk-r16b-windows-x86_64.zip,然后将所需的文件夹解压缩到与上述位置相同的新文件夹中。

• Finally, once again enter 
  

离子科尔多瓦准备android

建立科尔多瓦

The Ionic build order (as I observed it) is a follows ..

1. It looks for all the relevant Java and Android SDK paths .. 
2. Then uses Gradle as the build system .. 
3. Check for NDK bundle ..
4. Build project

以上花了我两天时间才弄清楚。希望它能帮助您,并且省去您的头痛。