2016-11-24 3 views
3

は、私はオプトアウトとして処理し、分析を初期化できませんでしたjava.io.filenotfoundexception:私はAndroidのスタジオを始めたとき/home/ljh/.android/analytics.settings(パーミッション拒否)

を得ました。 java.io.filenotfoundexception:/home/ljh/.android/analytics.settings(許可が拒否されました)

どうすればよいですか?私のOSは

+1

権限が拒否された場合は、指定したファイルのファイルとフォルダのアクセス許可を確認する必要がありますか? – ADyson

答えて

0

ソリューションは、上記のコマンドを発行することによって解決されるコンパイルエラーを

sudo dpkg --add-architecture i386 
sudo apt-get -qqy update 
sudo apt-get -qqy install libncurses5:i386 libstdc++6:i386 zlib1g:i386 

後、あなたのUbuntuのボックスにこれらの32ビットライブラリをされているインストールすることであるUbuntuの32bit版である:

:CordovaLib:generateReleaseResources 
:CordovaLib:packageReleaseResources 
    Building Cordova app for Android   \ 
:CordovaLib:generateReleaseBuildConfig 
FAILEDding Cordova app for Android   \ 

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':CordovaLib:processReleaseResources'. 
> com.android.ide.common.process.ProcessException: Failed to execute aapt 

スタックトレースをしてもよいですこれらのエラーも表示されます

BUILD FAILED 

Total time: 37.372 secs 
%% Command finished with error code 1: /home/stens/src/github.com/loudthink/loudspeed/.meteor/local/cordova-build/platforms/android/gradlew cdvBuildRelease,-b,/home/stens/src/github.com/loudthink/loudspeed/.meteor/local/cordova-build/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Dorg.gradle.jvmargs=-Xmx2048m,-Pandroid.useDeprecatedNdk=true 
=> Errors executing Cordova commands: 

    While building Cordova app for platform Android: 
    Error: /home/stens/src/github.com/loudthink/loudspeed/.meteor/local/cordova-build/platforms/android/gradlew: Command failed with exit code 1 
    Error output: 
    Could not initialize analytics, treating as opt-out. 
    java.io.FileNotFoundException: /home/stens/.android/analytics.settings (No such file or directory) 
0

あなたのユーザーではなく、root権限を持っている可能性があります。

2番目のコマンドで、rootがフォルダの所有者であることがわかります。 私はそれを私のユーザに変更しました。

[email protected]$ ls /home/lucas/.android/ 
ls: no se puede abrir el directorio '/home/lucas/.android/': Permiso denegado 

[email protected]$ ls -lart /home/lucas/ | grep android 
drwxr-x--- 2 root root  4096 sep 14 14:02 .android 

[email protected]$ sudo chown lucas:lucas /home/lucas/.android/ 
[sudo] password for lucas: 
Fingerprint Login 1.09 
Authenticating lucas 
Swipe your finger or type your password: 

[email protected]$ ls /home/lucas/.android/ 
adbkey adbkey.pub analytics.settings 
[email protected]:~/itecnis/simple/usuarios$ ls -lart /home/lucas/ | grep android 
drwxr-x--- 2 lucas lucas  4096 sep 14 14:02 .android 
関連する問題