android - java.io.FileNotFoundException gradle.properties(不允许操作)

标签 android macos cordova ionic-framework gradle

我正在新的 Mac book pro 上安装 ionic Angular 和 Cordova,在从旧 Mac book pro 迁移我的项目之前使用 ionic 入门模板对其进行测试。


我目前正在使用此安装指南:
https://ionicframework.com/docs/installation/android
https://ionicframework.com/docs/building/android .


iOS 一切正常。 我在尝试使用 android 进行测试时实际上遇到了以下错误:

    ionic cordova run android -l


I get the following error:

java.io.FileNotFoundException: /Users/ [...] /super/platforms/android/gradle.properties (Operation not permitted)

/usr/local/Cellar/gradle/6.1.1/bin/gradle: Command failed with exit code 1


Beside trying to reinstall several elements and check installation guides, I also tried to review and allow read & write permissions for the entire project.
If anyone has a lead or a solution it would be great.
Thanks in advance for your help.


Here is my setup

Ionic:
   Ionic CLI                     : 6.0.1 (/Users/****/.nvm/versions/node/v12.14.1/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 4.11.6
   @angular-devkit/build-angular : 0.803.20
   @angular-devkit/schematics    : 8.3.20
   @angular/cli                  : 8.3.20
   @ionic/angular-toolkit        : 2.1.1

Cordova: Cordova CLI : 9.0.0 ([email protected]) Cordova Platforms : android 8.1.0, ios 5.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 4 other plugins)

Utility: cordova-res : 0.9.0 native-run : 0.3.0

System: Android SDK Tools : 26.1.1 (/Users/****/Library/Android/sdk) ios-deploy : 1.10.0 ios-sim : 8.0.2 NodeJS : v12.14.1 (/Users/****/.nvm/versions/node/v12.14.1/bin/node) npm : 6.13.4 OS : macOS Catalina Xcode : Xcode 11.3.1 Build version 11C504

------------------------------------------------------------
Gradle 6.1.1
------------------------------------------------------------

Build time:   2020-01-24 22:30:24 UTC
Revision:     a8c3750babb99d1894378073499d6716a1a1fa5d

Kotlin:       1.3.61
Groovy:       2.5.8
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          1.8.0_241 (Oracle Corporation 25.241-b07)
OS:           Mac OS X 10.15.3 x86_64
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)


The gradle.properties file has the following content:

    org.gradle.daemon=true
    org.gradle.jvmargs=-Xmx2048m
    android.useDeprecatedNdk=true
    cdvMinSdkVersion=19

最佳答案

更新 Android Studio 后,我也遇到了类似的情况。我重新启动了 Mac,问题就消失了。

关于android - java.io.FileNotFoundException gradle.properties(不允许操作),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60095146/

相关文章:

java - 在fragment后台线程中更新TextView(UI线程)

Java:ArrayAdapter 获取单击的行 TextView 值

android - 从另一个 Fragment 填充 Listview

c# - Visual Studio 2015、Xamarin 和目标设备

ios - 强制或 "encouraging"iCloud 将更改上传到文件

java - Cordova 本地构建因应用程序大小而失败?

php - 使用 PHP 和 HTML 页面显示来自 MySQL 数据库的数据

android - 可以同时连接蓝牙和蓝牙 LE 吗?

javascript - 开发环境中与AJAX数据服务有关的PhoneGap环境变量?

C: fscanf 和字符/字符串大小