2016-01-20 24 views
4

我的應用程序在我的模擬器上正常工作,所以現在我試圖把它放在我的手機上。當我嘗試安裝我收到以下消息react-native部署到android設備錯誤3活動類不存在

... 
BUILD SUCCESSFUL 
Total time: 15.578 secs 

This build could be faster, please consider using the Gradle Daemon: http://gradle.org/docs/2.4/userguide/gradle_daemon.html 
Starting the app (/usr/local/opt/android-sdk/platform-tools/adb shell am start -n com.ethicalfishing/.MainActivity)... 
Starting: Intent { cmp=com.ethicalfishing/.MainActivity } 
Error type 3 
Error: Activity class {com.ethicalfishing/com.ethicalfishing.MainActivity} does not exist. 

我明白這個錯誤已經談過有關非反應原生應用程序,但是給出的解決方案要麼不相關或沒有幫助的(或者我沒有了解他們)

回答

7

我有同樣的問題。我發現build.gradle的applicationId和AndroidManifest.xml包是不同的。

的build.gradle:

defaultConfig { 
    applicationId "com.example.yourapp" 
    minSdkVersion 16 
    targetSdkVersion 22 
    versionCode 1 
    versionName "1.0" 
    ndk { 
     abiFilters "armeabi-v7a", "x86" 
    } 

那是在我的情況的問題。

+0

有同樣的問題。這固定它,謝謝YossiF! – shift66

+0

'build.gradle'和'AndroidManifest.xml'文件位於哪裏? – ArchNoob

+1

@ArchNoob'build.gradle'- $ {projectFolder} \ android \ app。 'AndroidManifest.xml'- $ {projectFolder} \ android \ app \ src \ main – YossiF

相關問題