我正在尝试导入Android项目.在显示以下错误的项目时:
Error: Caused by: org.gradle.api.GradleException: executing external native build for ndkBuild
/mnt/FE78E94378E8FAF3/AndroidProject/phimpme-android/app/src/main/jni/Android.mk
at com.android.build.gradle.internal.ExtraModelInfo.handleIssue(ExtraModelInfo.java:114)
at com.android.builder.core.ErrorReporter.handleSyncError(ErrorReporter.java:80)
Run Code Online (Sandbox Code Playgroud)
我已经安装了NDK,OpenCV,PhotoView.我已经尝试了与外部本机构建相关的所有StackOverflow帖子.我无法摆脱这个错误.
的build.gradle(APP)
apply plugin: 'com.android.application'
apply plugin: 'jacoco-android'
apply plugin: 'realm-android'
def keystorePropertiesFile = rootProject.file("sample_keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "org.fossasia.phimpme"
minSdkVersion 17
targetSdkVersion 25
multiDexEnabled true
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
vectorDrawables.useSupportLibrary = true
resConfigs "en"
ndk {
abiFilters 'armeabi-v7a', 'x86'
}
renderscriptTargetApi …Run Code Online (Sandbox Code Playgroud) android android-ndk android-studio android-gradle-plugin ndk-build
我是 Docker 和 Apache 的新手,正在尝试执行一个非常简单的程序,该程序将在我的本地主机上显示一个网页。然而,我一直听到403 Forbidden error这样一句话:
“您无权访问此服务器上的/”
。我正在Apache/2.4.25 (Debian)localhost Port 使用服务器5002。该目录的路径是~/tutorial/product. 我在这里阅读了许多解决方案,并尝试了所有解决方案,但没有一个对我有用。
/etc/apache2/apache2.conf
<Directory /var/www/html>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Run Code Online (Sandbox Code Playgroud)
/etc/apache2/sites-enabled/000-default.conf
ServerAdmin webmaster@localhost
DocumentRoot /var/www/signature
<Directory /var/www/signature/>
Allowoverride all
Order allow,deny
Allow from all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Run Code Online (Sandbox Code Playgroud)
我已使用以下命令将路径中每个目录的权限包含在内ls -l:
〜/教程
|---------------------|------------------| …Run Code Online (Sandbox Code Playgroud) 我无法将高分数提交给Android排行榜.现在排行榜是空的,没有提交任何内容.我有一个需要提交的int"oldScore".现在我正在尝试一段代码来提交它,但活动在被调用时崩溃了.我的代码:
public class GameOver extends BaseGameActivity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {
private GoogleApiClient mGoogleApiClient;
public static int score;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_game_over);
mGoogleApiClient.connect();
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Drive.API)
.addScope(Drive.SCOPE_FILE)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
int newScore = GameOver.score;
SharedPreferences prefs = this.getSharedPreferences("myPrefsKey", Context.MODE_PRIVATE);
int oldScore = prefs.getInt("key", 0);
if (newScore > oldScore) {
SharedPreferences.Editor edit = prefs.edit();
edit.putInt("key", newScore);
edit.commit();
EditText HighScore = (EditText) findViewById(R.id.HighScoreT);
HighScore.setText("" + newScore);
} else {
EditText HighScore = (EditText) findViewById(R.id.HighScoreT);
HighScore.setText("" + oldScore); …Run Code Online (Sandbox Code Playgroud)