Android Source Generator: Error: Can't find bundle for base name messages.AndroidJpsBundle

谁说我不能喝 提交于 2019-12-17 18:27:34

问题


I previously was using Android Studio v2.3 to Make Module and it was ok. Now I changed to Android Studio v3.0, when I trying to Make Module, it shows the error below:

Error:Android Source Generator: Error: Can't find bundle for base name messages.AndroidJpsBundle, locale en_US
java.util.MissingResourceException: Can't find bundle for base name messages.AndroidJpsBundle, locale en_US
    at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1564)
    at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387)
    at java.util.ResourceBundle.getBundle(ResourceBundle.java:773)
    at org.jetbrains.jps.android.AndroidJpsBundle.getBundle(AndroidJpsBundle.java:22)
    at org.jetbrains.jps.android.AndroidJpsBundle.message(AndroidJpsBundle.java:32)
    at org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.runAaptCompiler(AndroidSourceGeneratingBuilder.java:971)
    at org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.doBuild(AndroidSourceGeneratingBuilder.java:210)
    at org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.build(AndroidSourceGeneratingBuilder.java:114)
    at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1263)
    at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:940)
    at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1012)
    at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:903)
    at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:736)
    at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:384)
    at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:192)
    at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
    at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:295)
    at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
    at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:236)
    at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

回答1:


I ran into the same issue and this worked for me so let me know how it goes.

  1. Right click on your project and open up Module Settings
  2. Click facets.
  3. Add Android-Gradle and apply.
  4. Close and reopen project and rebuild.



回答2:


  1. backup AndroidStudio3.0\plugins\android\lib\jps\*.jar

  2. Copy AndroidStudio2.3.3\plugins\android\lib\jps\*.jar to AndroidStudio3.0\plugins\android\lib\jps\*.jar




回答3:


It looks like I did not open the correct project directory in Android Studio. I have a Grande project, but when opened [Project Folder] -> [Android] -> [App] as an existing project in Android Studio, it solved the problem for me!

When you open as existing project the [Project Folder] only in Android Studio and try to compile and generate the APK, it will show this error above: Error:Android Source Generator....

So, please ensure you import the correct directory of your Android Project ;-)



来源:https://stackoverflow.com/questions/45365854/android-source-generator-error-cant-find-bundle-for-base-name-messages-androi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!