java.lang.ClassNotFoundException: Didn't find class … on path: DexPathListLoading 3rd party shared libraries from an Android native activityandroid not receiving Intent ACTION_PACKAGE_REMOVED in the removed packageBug: onNewIntent not called for singleTop activity with Intent.FLAG_ACTIVITY_NEW_TASKAndroid SDK installation doesn't find JDKNative activity and “unable to load native library”Android - Google Maps API v2 - NoClassDefFoundErrorjava.lang.ClassNotFoundException: Didn't find class on path: dexpathlistDidn't find class on path: dexpathlistAndroid + Facebook SDK : “Failed to authenticate the application because of app name mismatch.”Android App can't deploy to virtual device[Android Studio]java.lang.RuntimeException: Unable to instantiate activity ComponentInfo java.lang.ClassNotFoundException: on path: DexPathList
How do you move up one folder in Finder?
Terry Pratchett book with a lawyer dragon and sheep
Has anyone in space seen or photographed a simple laser pointer from Earth?
Why do we need common sense in AI?
What is the measurable difference between dry basil and fresh?
How can a dictatorship government be beneficial to a dictator in a post-scarcity society?
Do I have a right to cancel a purchase of foreign currency in the UK?
Is English unusual in having no second person plural form?
Misspelling my name on my mathematical publications
Why isn't pressure filtration popular compared to vacuum filtration?
Salt, pepper, herbs and spices
Shortest hex dumping program
Why is the air gap between the stator and rotor on a motor kept as small as it is?
The tensor product of two monoidal categories
Are there any sports for which the world's best player is female?
What is this little owl-like bird?
How to deal with moral/legal subjects in writing?
What is a "shilicashe?"
What happens to unproductive professors?
Was I subtly told to resign?
Is "I do not want you to go nowhere" a case of "DOUBLE-NEGATIVES" as claimed by Grammarly?
Does Multiverse exist in MCU?
How can I truly shut down ssh server?
How quality assurance engineers test calculations?
java.lang.ClassNotFoundException: Didn't find class … on path: DexPathList
Loading 3rd party shared libraries from an Android native activityandroid not receiving Intent ACTION_PACKAGE_REMOVED in the removed packageBug: onNewIntent not called for singleTop activity with Intent.FLAG_ACTIVITY_NEW_TASKAndroid SDK installation doesn't find JDKNative activity and “unable to load native library”Android - Google Maps API v2 - NoClassDefFoundErrorjava.lang.ClassNotFoundException: Didn't find class on path: dexpathlistDidn't find class on path: dexpathlistAndroid + Facebook SDK : “Failed to authenticate the application because of app name mismatch.”Android App can't deploy to virtual device[Android Studio]java.lang.RuntimeException: Unable to instantiate activity ComponentInfo java.lang.ClassNotFoundException: on path: DexPathList
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm trying to build SFML app for android, but getting some strange errors.
First, my app configured like that:
Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := sfml-example
LOCAL_SRC_FILES := main.cpp
LOCAL_SHARED_LIBRARIES := sfml-system
LOCAL_SHARED_LIBRARIES += sfml-window
LOCAL_SHARED_LIBRARIES += sfml-graphics
LOCAL_SHARED_LIBRARIES += sfml-audio
LOCAL_SHARED_LIBRARIES += sfml-network
LOCAL_SHARED_LIBRARIES += sfml-activity
LOCAL_SHARED_LIBRARIES += openal
LOCAL_WHOLE_STATIC_LIBRARIES := sfml-main
include $(BUILD_SHARED_LIBRARY)
$(call import-module,third_party/sfml)
Application.mk
NDK_TOOLCHAIN_VERSION := 4.9
APP_PLATFORM := android-19
APP_STL := c++_static
APP_ABI := all
APP_MODULES := sfml-activity sfml-example
APP_OPTIM := release
APP_CFLAG := -g -O3
It's compiled and work fine on Android 5,6,7. But when I tried to launch app on android 6.0 I got an error:
java.lang.RuntimeException: Unable to start activity ComponentInfoorg.sfml_test.android/android.app.NativeActivity: java.lang.IllegalArgumentException: Unable to load native library: /data/app/org.sfmldev.android-1/lib/arm/libsfml-activity.so
I found similar problem in this question.
So I tried to write activity, which should load SFML lib. Activity code:
package org.sfmldev.android;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class SFMLLoader extends Activity
static
System.loadLibrary("sfml-activity");
System.loadLibrary("sfml-example");
@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
Intent intent = new Intent(SFMLLoader.this, android.app.NativeActivity.class);
SFMLLoader.this.startActivity(intent);
And i change my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.sfmldev.android">
<uses-feature android:glEsVersion="0x00010001" />
<uses-permission android:name="android.permission.VIBRATE" />
<application android:label="@string/app_name"
android:icon="@drawable/sfml_logo"
android:hasCode="false"
android:allowBackup="false"
android:testOnly="false"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="org.sfmldev.android.SFMLLoader"
android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="android.app.NativeActivity"
android:label="@string/app_name"
android:icon="@drawable/sfml_logo"
android:configChanges="keyboardHidden|orientation|screenSize">
<meta-data android:name="android.app.lib_name" android:value="sfml-activity" />
<meta-data android:name="sfml.app.lib_name" android:value="sfml-example" />
</activity>
</application>
</manifest>
And now I have new error on any devices:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfoorg.sfmldev.android/org.sfmldev.android.SFMLLoader: java.lang.ClassNotFoundException: Didn't find class "org.sfmldev.android.SFMLLoader" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
I'm already tried to make relative path, disable instance run, clean project, restart android studio, restart OS, delete .idea and .gradle
android android-ndk native sfml
add a comment |
I'm trying to build SFML app for android, but getting some strange errors.
First, my app configured like that:
Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := sfml-example
LOCAL_SRC_FILES := main.cpp
LOCAL_SHARED_LIBRARIES := sfml-system
LOCAL_SHARED_LIBRARIES += sfml-window
LOCAL_SHARED_LIBRARIES += sfml-graphics
LOCAL_SHARED_LIBRARIES += sfml-audio
LOCAL_SHARED_LIBRARIES += sfml-network
LOCAL_SHARED_LIBRARIES += sfml-activity
LOCAL_SHARED_LIBRARIES += openal
LOCAL_WHOLE_STATIC_LIBRARIES := sfml-main
include $(BUILD_SHARED_LIBRARY)
$(call import-module,third_party/sfml)
Application.mk
NDK_TOOLCHAIN_VERSION := 4.9
APP_PLATFORM := android-19
APP_STL := c++_static
APP_ABI := all
APP_MODULES := sfml-activity sfml-example
APP_OPTIM := release
APP_CFLAG := -g -O3
It's compiled and work fine on Android 5,6,7. But when I tried to launch app on android 6.0 I got an error:
java.lang.RuntimeException: Unable to start activity ComponentInfoorg.sfml_test.android/android.app.NativeActivity: java.lang.IllegalArgumentException: Unable to load native library: /data/app/org.sfmldev.android-1/lib/arm/libsfml-activity.so
I found similar problem in this question.
So I tried to write activity, which should load SFML lib. Activity code:
package org.sfmldev.android;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class SFMLLoader extends Activity
static
System.loadLibrary("sfml-activity");
System.loadLibrary("sfml-example");
@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
Intent intent = new Intent(SFMLLoader.this, android.app.NativeActivity.class);
SFMLLoader.this.startActivity(intent);
And i change my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.sfmldev.android">
<uses-feature android:glEsVersion="0x00010001" />
<uses-permission android:name="android.permission.VIBRATE" />
<application android:label="@string/app_name"
android:icon="@drawable/sfml_logo"
android:hasCode="false"
android:allowBackup="false"
android:testOnly="false"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="org.sfmldev.android.SFMLLoader"
android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="android.app.NativeActivity"
android:label="@string/app_name"
android:icon="@drawable/sfml_logo"
android:configChanges="keyboardHidden|orientation|screenSize">
<meta-data android:name="android.app.lib_name" android:value="sfml-activity" />
<meta-data android:name="sfml.app.lib_name" android:value="sfml-example" />
</activity>
</application>
</manifest>
And now I have new error on any devices:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfoorg.sfmldev.android/org.sfmldev.android.SFMLLoader: java.lang.ClassNotFoundException: Didn't find class "org.sfmldev.android.SFMLLoader" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
I'm already tried to make relative path, disable instance run, clean project, restart android studio, restart OS, delete .idea and .gradle
android android-ndk native sfml
add a comment |
I'm trying to build SFML app for android, but getting some strange errors.
First, my app configured like that:
Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := sfml-example
LOCAL_SRC_FILES := main.cpp
LOCAL_SHARED_LIBRARIES := sfml-system
LOCAL_SHARED_LIBRARIES += sfml-window
LOCAL_SHARED_LIBRARIES += sfml-graphics
LOCAL_SHARED_LIBRARIES += sfml-audio
LOCAL_SHARED_LIBRARIES += sfml-network
LOCAL_SHARED_LIBRARIES += sfml-activity
LOCAL_SHARED_LIBRARIES += openal
LOCAL_WHOLE_STATIC_LIBRARIES := sfml-main
include $(BUILD_SHARED_LIBRARY)
$(call import-module,third_party/sfml)
Application.mk
NDK_TOOLCHAIN_VERSION := 4.9
APP_PLATFORM := android-19
APP_STL := c++_static
APP_ABI := all
APP_MODULES := sfml-activity sfml-example
APP_OPTIM := release
APP_CFLAG := -g -O3
It's compiled and work fine on Android 5,6,7. But when I tried to launch app on android 6.0 I got an error:
java.lang.RuntimeException: Unable to start activity ComponentInfoorg.sfml_test.android/android.app.NativeActivity: java.lang.IllegalArgumentException: Unable to load native library: /data/app/org.sfmldev.android-1/lib/arm/libsfml-activity.so
I found similar problem in this question.
So I tried to write activity, which should load SFML lib. Activity code:
package org.sfmldev.android;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class SFMLLoader extends Activity
static
System.loadLibrary("sfml-activity");
System.loadLibrary("sfml-example");
@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
Intent intent = new Intent(SFMLLoader.this, android.app.NativeActivity.class);
SFMLLoader.this.startActivity(intent);
And i change my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.sfmldev.android">
<uses-feature android:glEsVersion="0x00010001" />
<uses-permission android:name="android.permission.VIBRATE" />
<application android:label="@string/app_name"
android:icon="@drawable/sfml_logo"
android:hasCode="false"
android:allowBackup="false"
android:testOnly="false"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="org.sfmldev.android.SFMLLoader"
android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="android.app.NativeActivity"
android:label="@string/app_name"
android:icon="@drawable/sfml_logo"
android:configChanges="keyboardHidden|orientation|screenSize">
<meta-data android:name="android.app.lib_name" android:value="sfml-activity" />
<meta-data android:name="sfml.app.lib_name" android:value="sfml-example" />
</activity>
</application>
</manifest>
And now I have new error on any devices:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfoorg.sfmldev.android/org.sfmldev.android.SFMLLoader: java.lang.ClassNotFoundException: Didn't find class "org.sfmldev.android.SFMLLoader" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
I'm already tried to make relative path, disable instance run, clean project, restart android studio, restart OS, delete .idea and .gradle
android android-ndk native sfml
I'm trying to build SFML app for android, but getting some strange errors.
First, my app configured like that:
Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := sfml-example
LOCAL_SRC_FILES := main.cpp
LOCAL_SHARED_LIBRARIES := sfml-system
LOCAL_SHARED_LIBRARIES += sfml-window
LOCAL_SHARED_LIBRARIES += sfml-graphics
LOCAL_SHARED_LIBRARIES += sfml-audio
LOCAL_SHARED_LIBRARIES += sfml-network
LOCAL_SHARED_LIBRARIES += sfml-activity
LOCAL_SHARED_LIBRARIES += openal
LOCAL_WHOLE_STATIC_LIBRARIES := sfml-main
include $(BUILD_SHARED_LIBRARY)
$(call import-module,third_party/sfml)
Application.mk
NDK_TOOLCHAIN_VERSION := 4.9
APP_PLATFORM := android-19
APP_STL := c++_static
APP_ABI := all
APP_MODULES := sfml-activity sfml-example
APP_OPTIM := release
APP_CFLAG := -g -O3
It's compiled and work fine on Android 5,6,7. But when I tried to launch app on android 6.0 I got an error:
java.lang.RuntimeException: Unable to start activity ComponentInfoorg.sfml_test.android/android.app.NativeActivity: java.lang.IllegalArgumentException: Unable to load native library: /data/app/org.sfmldev.android-1/lib/arm/libsfml-activity.so
I found similar problem in this question.
So I tried to write activity, which should load SFML lib. Activity code:
package org.sfmldev.android;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class SFMLLoader extends Activity
static
System.loadLibrary("sfml-activity");
System.loadLibrary("sfml-example");
@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
Intent intent = new Intent(SFMLLoader.this, android.app.NativeActivity.class);
SFMLLoader.this.startActivity(intent);
And i change my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.sfmldev.android">
<uses-feature android:glEsVersion="0x00010001" />
<uses-permission android:name="android.permission.VIBRATE" />
<application android:label="@string/app_name"
android:icon="@drawable/sfml_logo"
android:hasCode="false"
android:allowBackup="false"
android:testOnly="false"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="org.sfmldev.android.SFMLLoader"
android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="android.app.NativeActivity"
android:label="@string/app_name"
android:icon="@drawable/sfml_logo"
android:configChanges="keyboardHidden|orientation|screenSize">
<meta-data android:name="android.app.lib_name" android:value="sfml-activity" />
<meta-data android:name="sfml.app.lib_name" android:value="sfml-example" />
</activity>
</application>
</manifest>
And now I have new error on any devices:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfoorg.sfmldev.android/org.sfmldev.android.SFMLLoader: java.lang.ClassNotFoundException: Didn't find class "org.sfmldev.android.SFMLLoader" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
I'm already tried to make relative path, disable instance run, clean project, restart android studio, restart OS, delete .idea and .gradle
android android-ndk native sfml
android android-ndk native sfml
edited Mar 26 at 8:36
Zoe
16.3k9 gold badges63 silver badges95 bronze badges
16.3k9 gold badges63 silver badges95 bronze badges
asked Mar 26 at 1:20
FqqltFqqlt
61 silver badge3 bronze badges
61 silver badge3 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You are supposed to load your library on runtime not on activity create:
public class SFMLLoader extends Activity
static
System.loadLibrary("sfml-activity");
System.loadLibrary("sfml-example");
@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
...
add a comment |
Just forgot to remove android:hasCode="false"
from AndroidManifest.xml
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348561%2fjava-lang-classnotfoundexception-didnt-find-class-on-path-dexpathlist%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You are supposed to load your library on runtime not on activity create:
public class SFMLLoader extends Activity
static
System.loadLibrary("sfml-activity");
System.loadLibrary("sfml-example");
@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
...
add a comment |
You are supposed to load your library on runtime not on activity create:
public class SFMLLoader extends Activity
static
System.loadLibrary("sfml-activity");
System.loadLibrary("sfml-example");
@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
...
add a comment |
You are supposed to load your library on runtime not on activity create:
public class SFMLLoader extends Activity
static
System.loadLibrary("sfml-activity");
System.loadLibrary("sfml-example");
@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
...
You are supposed to load your library on runtime not on activity create:
public class SFMLLoader extends Activity
static
System.loadLibrary("sfml-activity");
System.loadLibrary("sfml-example");
@Override
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
...
answered Mar 26 at 1:33
SdghasemiSdghasemi
1,7581 gold badge13 silver badges25 bronze badges
1,7581 gold badge13 silver badges25 bronze badges
add a comment |
add a comment |
Just forgot to remove android:hasCode="false"
from AndroidManifest.xml
add a comment |
Just forgot to remove android:hasCode="false"
from AndroidManifest.xml
add a comment |
Just forgot to remove android:hasCode="false"
from AndroidManifest.xml
Just forgot to remove android:hasCode="false"
from AndroidManifest.xml
answered Mar 26 at 11:56
FqqltFqqlt
61 silver badge3 bronze badges
61 silver badge3 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348561%2fjava-lang-classnotfoundexception-didnt-find-class-on-path-dexpathlist%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown